Page 3 of 3

Re: Start of a date handling library

Posted: Mon Aug 04, 2014 2:43 pm
by malte
Hi Herrmann,

that won't work. The short english date would be what I am after (along with the short english dateFormat for that matter) Sorry for the typo in my previous post...
. The dubious thing is, I have seen %#m and %#d before reported from the engine, even though that is not documented either. %#y I never saw though.

From the dict:

Code: Select all

The dateFormat function returns a string.
Comments:
The dateFormat function returns a string containing one or more formatting incantations, each of which describes a part of the requested date format. The possible incantations are as follows:
%a
Abbreviated weekday name:  the abbreviated day of the week, as reported by the weekdayNames function
%A
Full weekday name:  the full day of the week, as reported by the weekdayNames function
%b
Abbreviated month name:  the abbreviated month name, as reported by the monthNames function
%B
Full month name:  the full month name, as reported by the monthNames function
%d
Day of the month:  the day of the month as a number
%m
Month number:  the number of the month
%y
Two-digit year:  the year as a two-digit number
%Y
Four-digit year:  This incantation indicates the year as a four-digit number (including the century)
%w
Day of the week:  A number between 1 and 7
The funny part here that there is no mention of the %# forms at all...

All the best,

Malte

Re: Start of a date handling library

Posted: Mon Aug 04, 2014 3:11 pm
by [-hh]
..........

Re: Start of a date handling library

Posted: Mon Aug 04, 2014 4:09 pm
by malte
Not documented, but in the lib:

libDate_today()

will give yyyy,MM,dd

I guess the clock would be something more of a widget (which might well use the lib of course). Not sure if I would like some sort of timer in the lib. That would only be stable as long as messages are not locked and maybe it is suited better in a UI stack?

Best,

Malte

Re: Start of a date handling library

Posted: Wed Apr 01, 2015 11:24 am
by malte
libdate is now on gitHub:

https://github.com/derbrill/libdate