summary refs log tree commit diff stats
path: root/lib/pure/times.nim
Commit message (Collapse)AuthorAgeFilesLines
* Time has now reference semantics on jsYuriy Glukhov2016-06-011-1/+2
|
* Adding OpenBSD to definescheatfate2016-05-301-4/+4
|
* Resolve #3059cheatfate2016-05-301-31/+76
| | | | Make getTimezone() to work properly on FreeBSD and NetBSD.
* Some documentation fixes in times module.Dominik Picheta2016-04-061-8/+15
|
* Deprecate timeToTimeInfo, add str->time procscoffeepots2016-04-061-36/+43
| | | | | | | | | | | | | | | | | | | | | | | * depreciate timeToTimeInfo, add str->time procs initTime allows creating times from strings. initTimeFromStr offers a default format string compatible with $Time. timeToTimeInterval changed to work properly. * Spell {.deprecated.} correctly * deprecated timeToTimeInfo, removed initTime procs Is it even worth depreciating timeToTimeInfo rather than just removing it, considering it's just wrong and we have getLocalTime and getGMTime that actually work? Also, if I'm renaming timeToTimeInfo -> toTimeInfo etc, isn't the deprecated tag kind of redundant? * Updated names for toTime and toTimeInterval procs * Added type to toTime template This should allow compilation of os.nim now that toTime is defined in times.nim. * Updated toTime template to use {.gensym.} Local templates default to 'bind' semantics, not 'gensym'. This was causing a failure to 'see' the local toTime template.
* SpellcheckFederico Ceratto2016-02-291-1/+1
|
* Fixed issue 3905 with getTimezone in jsAnatoly Galiulin2016-02-261-1/+1
|
* Fixed TimeInterval bug.Dominik Picheta2016-01-081-6/+9
|
* Fixed ttime test. Improved docs in times module.Dominik Picheta2016-01-081-3/+16
|
* add timeinterval helping functions as per issue #3609JamesP2015-12-081-22/+130
| | | | | | | | | | add tests to ttime.nim for timeinterval add/subtract functionality Changed assert to doAssert in ttime.nim Added extra tests to ttime.nim Removal of singular help procs for working with TimeIntervals Added TimeIin proc toSeconds(a: TimeInfo, interval: TimeInterval) where subtracting a year gave wrong results Add overflow of units on initInterval eg, 65 seconds is 5 seconds and 1 minute
* Add comment at end of file on where to find further testsJamesP2015-12-011-0/+3
|
* Removal of tests from times module, that have been moved to ttime.nim test fileJamesP2015-12-011-116/+4
|
* added an assertionAraq2015-10-271-1/+3
|
* Example: add extra getGmTime interval addition exampleJamesP2015-09-101-1/+2
|
* tests added: toSeconds with local/GM timezones, interval add/subJamesP2015-09-101-0/+25
| | | | with local/GM timezones
* bug fix: `+` and `-` handle GM and Local time correctlyJamesP2015-09-101-8/+8
| | | | eg, getGmTime(getTime()) + initInterval(hours=1) gave incorrect results
* add examples block to top of times moduleJamesP2015-09-101-0/+19
|
* times: Export & document countLeapYears/Years/DaysAdam Strzelecki2015-09-031-14/+18
| | | | | | | | Previously countYears & countDays procs were not public, but there were unused, causing unnecessary warnings generated by standard library. Since these procs seems to be useful it is better to just export them than remove them completely. Also turning inline comments into proper documentation.
* Fixed compilation of times module with JS.Yuriy Glukhov2015-08-141-16/+18
|
* Fixed fromSeconds function JS variantYuriy Glukhov2015-08-121-1/+1
|
* Merge pull request #3114 from coffeepots/patch-1Dominik Picheta2015-08-081-0/+126
|\ | | | | Procs to decode Time to TimeInfo & TimeInterval
| * Removed unused leapYearsSinceEpochcoffeepots2015-07-311-3/+0
| |
| * Implemented changes suggested by dom96coffeepots2015-07-311-42/+39
| | | | | | | | | | | | * Removed extraneous exports (and converted const array to separate consts) * Renamed dayOfWeek, dayOfWeekJulian to getDayOfWeek and getDayOfWeekJulian * Renamed decodeTime procs to timeToTimeInfo and timeToTimeInterval * Added some basic descriptions to docs
| * Fixed dayOfWeekJulian, exported SecondScalecoffeepots2015-07-161-5/+7
| |
| * Procs to decode Time to TimeInfo & TimeIntervalcoffeepots2015-07-141-0/+130
| | | | | | Fills in the missing functionality of decoding Time to TimeInfo and TimeInterval, whilst also adding some procs to work with leap years and to get the day of the week based on a date.
* | Merge pull request #3161 from barcharcraz/fix_times_on_vcc2015Dominik Picheta2015-08-031-5/+11
|\ \ | | | | | | import the correct symbols on windows
| * | make this change VCC specificCharlie Barto2015-08-021-3/+8
| | |
| * | import the correct symbols on windowsCharlie Barto2015-07-311-6/+7
| | |
* | | Improved errors in times.parse.Dominik Picheta2015-07-241-7/+14
| | |
* | | Fix times' parse with literal stringsMagnus Holm2015-07-241-1/+3
| |/ |/|
* | Added `getDaysInYear` procapense2015-07-061-2/+6
| |
* | stdlib: don't use deprecated symbolsAraq2015-06-041-1/+1
| |
* | Fixed 'milliseconds' spelling in code and docspdw2015-05-151-6/+11
| |
* | Year shouldn't be arbitrarily limited to -10_000 .. 10_000. Instead it'sdef2015-04-291-2/+2
|/ | | | an int now.
* fixes #2517Araq2015-04-251-23/+23
|
* Turn some test outputs into actual testsOleh Prypin2015-04-211-3/+1
|
* Don't run non-test code when defined(testing)Oleh Prypin2015-04-211-3/+5
|
* Implemented epochTime function for JS target.yglukhov2015-03-311-0/+2
|
* Use <time.h> instead of <sys/time.h> for tzset and time_tdef2015-03-231-73/+73
| | | | This fixes compilation on Linux.
* Merge pull request #2309 from oderwat/fix-tznameDominik Picheta2015-03-121-0/+5
|\ | | | | Fixes tzname on osx (and presumable bsd).
| * Adding a call to tzset() to implicitly initialize the tzname infos.Hans Raaf2015-03-121-0/+5
| |
* | Fix some compiler warnings in timesdef2015-03-121-8/+9
|/
* Replaced deprecated repeatChar() with repeat() or spaces().Hans Raaf2015-03-041-4/+4
|
* Merge pull request #2097 from jferg2010/develAndreas Rumpf2015-02-121-1/+328
|\ | | | | Date/time parsing
| * Date/time parsing - removed comments from assertJeff2015-02-111-6/+6
| |
| * Date/time parsing with changes suggested by AraqJeff2015-02-111-334/+283
| |
| * Date/time parsing with minor changes requested by Dom96Jeff2015-02-091-32/+29
| |
| * Date/time parsingJeff2015-02-091-7/+388
| |
* | fixed minor bugs; cleaned up testsAraq2015-02-121-51/+51
|/
* merged things from develAraq2014-09-121-1/+1
|\