1. date() 2015==115
- Posted by petelomax Sep 12, 2015
- 1277 views
There is no other word for it: naff.
It may have had a use 16+ years ago to make dd/mm/yy (ie a two digit year) a tad easier to print, but that has long since gone.
I think it is time to bite the bullet and say that date() returns the actual year, not minus 1900.
Yes, it will break some legacy code, but really if you see dd/mm/3915 you will instantly know precisely what is going on.
As it stands it marks out euphoria as some kind of inexplicably not yet extinct dinosaur.
Any other thoughts?
Pete
2. Re: date() 2015==115
- Posted by xecronix Sep 12, 2015
- 1304 views
Yep. Naff about sums it up. An honest assessment of what would actually break is probably in order if we were to actually fix it. In particular, I would be concerned with database code. Alternatively, a new date function could be a solution. Date() maybe? IDK.
3. Re: date() 2015==115
- Posted by ghaberek (admin) Sep 14, 2015
- 1232 views
The datetime library addresses this problem. You can use datetime:now() instead of date().
include std/console.e include std/datetime.e datetime dt = datetime:now() display( datetime:format(dt) ) maybe_any_key()
2015-09-14 08:52:37
-Greg