Start of a date handling library

Are you developing tools to extend the LiveCode environment? This is the place to talk about the nuts and bolts of extending our nuts and bolts. If you want to use a LiveCode or third party Environment extension, visit the Using Evironment Extensions forum.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Start of a date handling library

Post by malte » Mon Aug 04, 2014 2:43 pm

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

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Start of a date handling library

Post by [-hh] » Mon Aug 04, 2014 3:11 pm

..........
Last edited by [-hh] on Wed Aug 13, 2014 4:03 pm, edited 1 time in total.
shiftLock happens

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Start of a date handling library

Post by malte » Mon Aug 04, 2014 4:09 pm

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

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Start of a date handling library

Post by malte » Wed Apr 01, 2015 11:24 am

libdate is now on gitHub:

https://github.com/derbrill/libdate

Post Reply

Return to “Making IDE Plugins”