system date format
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
system date format
The "convert" command documents the "date" and "short date" formats as month/day/year, where the year is two digits. This is correct. The "system date" and "short system date" functions are documented the same way, but they actually produce a four-digit year.
If I had my druthers, "date" and "system date" would produce four-digit years, and "short date" and "short system date" would produce two-digit years.
If I had my druthers, "date" and "system date" would produce four-digit years, and "short date" and "short system date" would produce two-digit years.
Ciao,
Paul
Paul
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: system date format
That's an obscure word very few people outwith North America are going to understand.druthers
It is bad enough having to put up with the FACT that LiveCode, while being made in Scotland, wants to cosy up to the North Americans by getting dates wrong!
Who ever heard of putting the month in front of the day?
--------------
let's play games;
put the date gives me 9/24/18 [ which I would write 24/9/18 ]
put the system date gives me .09.2018 which is to my mind, very odd.
convert the date to long english date gives me Monday, September 24, 2018 which even I cannot object to.
I don't know where system date is documented . . . a search in the documentation produced dateFormat
Which, if you think about things, means you can set the way dates work in almost any way you like.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
And incantations has to go down on record as my favourite word in computer programming.
Re: system date format
This is definitively no bug, so I will move this thread to the beginners section!
Re: system date format
Hi,
in my LC (6.7.10) the dictionary says (searching "date"):
Have fun!
in my LC (6.7.10) the dictionary says (searching "date"):
This may also solve the problem of the OP.Comments:
The format of the system date forms is set by the Date & Time control panel (on Mac OS systems), the Date control panel (on Windows systems), or the LANG environment variable (on Unix systems).
Have fun!
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: system date format
Richmond.
Craig
You fail to cozy up to the United States at your peril.It is bad enough having to put up with the FACT that LiveCode, while being made in Scotland, wants to cosy up to the North Americans by getting dates wrong!
Craig
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: system date format
The ONLY reason I might do that is that the thought of getting into the bed with the Russian Bear is far, far worse.You fail to cozy up to the United States at your peril.
Re: system date format
I see. Somewhere I saw an example of getting the current time using "system date", not realizing that "date" gets the current time and "system" modifies its format. Never mind.
Ciao,
Paul
Paul
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: system date format
Just so you know, it is possible to roll your own in any format using the "dateItems". There have been times when I needed to parse the information in special ways. It is easy to do, and you can keep each instance in a library somewhere.
Craig
Craig
Re: system date format
What about when the year is before 1970?
(Yeah, it's a problem on Windows)
(Yeah, it's a problem on Windows)
Re: system date format
It doesn't help Windows users. LiveCode on Windows thinks a date before 1970 "is not a date" or errors.
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: system date format
Nothing can ever help Windows users.
Craig
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9840
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: system date format
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: system date format
Banter aside, does really nobody care about Windows?
-
- VIP Livecode Opensource Backer
- Posts: 9840
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: system date format
I use it for at least part of nearly every work day. After Android, it's three most popular platform in the world. And in terms of making money, Windows is arguably the most important platform LiveCode supports.
That said, in all my years in this industry I've never met anyone who truly loved it. I've met many who like it, but not with the sort of passion we often see with Mac and Linux fans.
Personally, I care about Windows a lot. I just don't care for it much.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn