Skip to content

Commit 0ed9e50

Browse files
committed
this should be ran before other functions
1 parent bc6ba2a commit 0ed9e50

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

scripts/announcements.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ new_coffee_code <- keep_only_new(coffee_code_details)
8989
# Create files in _posts/ -------------------------------------------------
9090
# Adds the new sessions/events to the _posts folder.
9191

92+
# Format as eg August 23
93+
day_month <- function(.date, add_name = TRUE) {
94+
date_format <- "%B %e" # as August 23
95+
if (add_name) date_format <- "%A, %B %e" # as Monday, August 23
96+
trimws(format(as.Date(.date), format = date_format))
97+
}
98+
9299
create_new_posts_with_content <- function(.data) {
93100
new_post_filenames <-
94101
glue_data(.data, "{here::here('_posts')}/{date}-{key}.md")
@@ -154,13 +161,6 @@ post_gh_issue <- function(title, body, labels) {
154161
}
155162
}
156163

157-
# Format as eg August 23
158-
day_month <- function(.date, add_name = TRUE) {
159-
date_format <- "%B %e" # as August 23
160-
if (add_name) date_format <- "%A, %B %e" # as Monday, August 23
161-
trimws(format(as.Date(.date), format = date_format))
162-
}
163-
164164
gh_issue_info_event <- function(.data) {
165165
content <- .data %>%
166166
mutate(needs_packages = ifelse(

0 commit comments

Comments
 (0)