Skip to content

Commit

Permalink
add calendar weeks for pre
Browse files Browse the repository at this point in the history
introducing CW and KW placeholders for calendarweeks.
WOY (%W) gives an offset of -1 to the real calendarweek.
  • Loading branch information
glftpd-scripts committed Nov 8, 2014
1 parent 81ca514 commit 41d8805
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pre/foo-pre.c
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,10 @@ char *section_expand_path(char *sec) {
strftime(buf, 1024, "%W", tm_now);
pre_replace(tmp, "WOY", buf);

strftime(buf, 1024, "%V", tm_now);
pre_replace(tmp, "CW", buf);
pre_replace(tmp, "KW", buf);

// if its a link then expand it.
reps = readlink(tmp, buf, 1024);

Expand Down

0 comments on commit 41d8805

Please sign in to comment.