[systemd-devel] Feature request: schedule jobs for last day of month

Lennart Poettering lennart at poettering.net
Thu Feb 7 19:30:42 PST 2013


On Tue, 05.02.13 12:42, Dave (dave at flex.com.au) wrote:

> 
>  In the year 2013, of the month of February, on the 4th day, Larry Baker wrote:
> > What about "2012-02~4" (leave off the "-")?  Thus, "-" implies day (days
> > from the start) of the month, "~" implies days from the end of the month.
> 
>  Nice.  I like this one.  Simple, neat, and feels right.  The tilde is
> significantly different, that I can tell at a glance it's not a standard
> date format, yet similar enough that it feels like one.

Yeah, this syntax looks OK to me too. I have now added a TODO list item
suggesting this syntax.

> > Should both notations have the same "1" base?  That is, "*-*-1" is the
> > first day of the month.  Is "*-*~1" the last day of the month?  Or, is "~"
> > a delta, so that "*-*~0" is the last day of the month?
> 
>  A delta makes sense from a mathematical perspective, but intuitively,
> "~1" leaps out at me as last-day-of-month, "~2" as second last day, etc.

This syntax is supposed to be readable before anything else, hence i'd
propose ~1 as last day of the month, ~2 as second last day, and so
on. "2012-02-0"  and "2012-02~0" should result in parse failures.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list