| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Allow timezone procs to be closures
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Add warnings about deprecation to times module
I've added warnings about some procedures being deprecated.
Also I can't find what is the replacement for `getTimezone` proc, please help with that
* Update times.nim
* Update times.nim
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* First work on better timezones
* Update tests to new api.
Removed tests for checking that `isDst` was included when formatting, since `isDst` no longer affects utc offset (the entire utc offset is stored directly in `utcOffset` instead).
* Deprecate getLocaltime & getGmTime
* Add `now()` as a shorthand for GetTIme().inZone(Local)
* Add FedericoCeratto's timezone tests (#6548)
* Run more tests in all timezones
* Make month enum start at 1 instead of 0
* Deprecate getDayOfWeekJulian
* Fix issues with gc safety
* Rename TimeInfo => DateTime
* Fixes #6465
* Improve isLeapYear
* FIx handling negative adjTime
* Cleanup:
- deprecated toSeconds and fromSeconds, added fromUnix and toUnix instead (that returns int64 instead of float)
- added missing doc comments
- removed some unnecessary JS specific implementations
* Fix misstake in JS `-` for Time
* Update usage of TimeEffect
* Removed unecessary use of `difftime`
* JS fix for local tz
* Fix subtraction of months
* Fix `days` field in `toTimeInterval`
* Style and docs
* Fix getDayOfYear for real this time...
* Fix handling of adding/subtracting time across dst transitions
* Fix some bad usage of the times module in the stdlib
* Revert to use proper time resoultion for seeding in random.nim
* Move deprecated procs to bottom of file
* Always use `epochTime` in `randomize`
* Remove TimeInterval normalization
* Fixes #6905
* Fix getDayOfWeek for year < 1
* Export toEpochDay/fromEpochDay and change year/month/monthday order
* Add asserts for checking that the monthday is valid
* Fix some remaining ambiguous references to `Time`
* Fix ambiguous reference to Time
|
| |
|
| |
|
|
|
|
| |
headers (#6442)
|
| |
|
| |
|
|
|
| |
The output can be surprising - better provide examples.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* avoid generating object fields for imported types
* fix some abi/type issues for linux_amd64
|
|
|
|
| |
To use JS's Date creation from string, I moved the TimeInfo formatting code above the toTime proc declaration. Also, I changed the argument type for newDate from string to cstring for it to work.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Add yearday calculation to getLocalTime and getGMTime, so that yearday is not 0 for TimeInfo instances under JS backend.
Yearday 0 has no sense and contradicts the behaviour under C backend, where yearday is an int from 1 to 365, i.e. cannot be 0 even theoretically.
|
|/
|
|
| |
The conversion would produce incorrect timestamp.
|
| |
|
|
|
| |
toTime(): Use the Windows-specific part for every OS, because it gives correct results on Linux too. The removed code for Linux gives wrong results.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
_mkgmtime is not supported by mingw because of the older msvcrt
versions. Fortunately, mktime implementation in Windows is just broken
enough to make the initial implementation work...
As far as I can tell, this works with both *nix-like platforms
and Win, and fixes #4690
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* added prefix `-` operator for TimeInterval
* improved `-` for both TimeInterval and TimeInfo
* Fixed a DST test
|
|
|
|
|
|
|
|
|
| |
* When formatting timezone, substract 1 hour from timezone when isDST
* Do not depend DST in current timezone when parsing arbitrary date
because formatted timestamps are never in DST.
* On the way, removed an unnecessary line in parsing code which could
cause bugs.
* Added DST tests
|
| |
|
|
|
|
|
| |
* This was introduced in recent "cosmetic" fix. Not so cosmetic
after all…
|
|\
| |
| | |
Add 'noSideEffect' pragma for Time type's operators. Fixes #4981
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
* Don't use factor var, it's overly complicated
* Removed proc that's now unused
* Better documented timezone field
|
| |
| |
| |
| |
| |
| | |
* Improved comments
* Improved spacing
* Use consts instead of magic numbers
|
| |
| |
| |
| |
| |
| | |
* `$` now uses format() with explicit time zone.
* Fixed errors in rendering "z", "zz" and "zzz"
* Updated tests
|
| |
| |
| |
| |
| |
| |
| | |
* No mapping between TimeInfo.tzname and TimeInfo.timezone
* tzname of time.h is not well-defined, may have almost arbitrary
length, and localization may differ
* Code used hardcoded "UTC" string
|
| | |
|
| | |
|