BlitzMax & International dates

BlitzMax Forums/BlitzMax Beginners Area/BlitzMax & International dates

xlsior(Posted 2007) [#1]
BlitzMax has the command: CurrentDate$()

From the help:
Returns the current date in the format: DD MON YYYY (i.e. 10 DEC 2000).


This appears to be not entirely correct in that the capitalization is different ('10 Dec 2000' instead) but more importantly:

Does anyone know whether the returned month is always in English, or does it also localize the results?


GfK(Posted 2007) [#2]
Dunno, but you might want to look at Brucey's new DateTime module. Check the worklogs for more info.


xlsior(Posted 2007) [#3]
Heh. Interesting.

I had no idea that he just released a DateTime module a couple of days ago. Interestingly enough I did double-check my module folder in case Brucey had anything in there, before writing some date comparison routines of my own this evening.

...Which I just posted to the code archives, for anyone interested:

- Find out whether or not a year is a leapyear
- Get the day in the year for any specific date
- Calculate how many days apart two arbitrary dates are


tonyg(Posted 2007) [#4]
Klepto did this one as well.


Brucey(Posted 2007) [#5]
BlitzMax has the command: CurrentDate$()

Which I found to be pretty much useless if you wanted to actually *use* it for anything.

Spent a while looking for a good library that would do everything I wanted, rather than having to hand-craft all the calculations myself - cuz I don't like re-inventing the wheel all the time.
The boost datetime lib pretty much does everything *I* would want a datetime module to do, so I am very happy with it.
I also included 74 language translations of months and weekdays incase anyone would need that kind of thing. (Yes, they are in a format that would require my locale and libxml module to use, but one can always pull the data out of the xml in another way if they so desire. But again, I just use the tools I have at hand to make the job easier - no point having all these modules if I don't use them ;-)

For some simple datetime stuff, my module is likely to be overkill (no, really!), but for serious work, there's currently nothing else as capable in BlitzMax, as far as I know.