Commit Graph

245 Commits

Author SHA1 Message Date
Andreas Rumpf
5237ef4f52 update the documentation about the new strings/seqs behaviours 2018-04-29 08:14:00 +02:00
Oscar Nihlgård
b34580fd5b Rename Time.nanoseconds to nanosecond (#7673)
* Rename `Time.nanoseconds` to `nanosecond`

* Fix bug with Duration comparision
2018-04-25 02:43:26 +02:00
Oscar Nihlgård
7d034d7b6a Add fromWinTime and deprecate unixTimeToWinTime/winTimeToUnixTime (#7641) 2018-04-19 22:41:06 +02:00
Oscar Nihlgård
02d6dd723d Timeinterval optimization (#7608)
* TimeInterval optimization

* Fix typo in `$`(Duration)
2018-04-16 00:01:34 +02:00
Oscar Nihlgård
f6df2d9956 Sub second time resolution (#6978)
* Add deprecation warnings to recently deprecated procs

* Fix bad usage of the times module

* Introduce sub second resolution

* Fix usage of C's time()

* Switch to nanosecond resolution

* Make Time & Duration opaque again and fix some errors

* Change back to TimeInterval for shorthands

* Fix JS test

* Fix build error for windows

* Undeprecate epochTime

* Documentation and minor changes

* Lots of bugfixes and doc comments

* Attempt to make travis & appveyor green

* Fix edge cases for dealing with the local timezone

* Workaround JS backend overflow/underflow bug

* Use better workaround for not knowing the size of time_t

* Use all available timezones for tests

* Fix indentation

* Add procs for accessing the fractional part of a duration

* Order time units from smallest to largest since it makes more sense

* Include months and years in `TimeUnit`

* Review fix
2018-04-13 07:36:30 +02:00
treeform
f3db632b1d Added count(*) support to sql parser. Fixed warnings in sql parser. (#7490) 2018-04-12 17:49:24 +02:00
Dominik Picheta
58dc8a399e Merge pull request #7450 from cabhishek/devel
Fixes #6902
2018-04-04 22:36:18 +01:00
Dominik Picheta
7ef0cfebb5 Merge pull request #7495 from GULPF/fix-fill-bug
Fix algorithm.fill for empty input
2018-04-04 13:54:40 +01:00
Oscar Nihlgård
da077eea7c Move algorithm tests away from koch 2018-04-04 13:00:51 +02:00
Dominik Picheta
39c71d6211 Merge pull request #7336 from yglukhov/ipaddr-sockaddr-conversions
Conversion procs for (IpAddress, Port) <-> (SockAddr, Socklen)
2018-04-02 14:31:05 +01:00
data-man
759023e157 Comparing datetimes 2018-04-01 00:41:38 +03:00
Abhishek Kapatkar
c7cba5e6f0 Fixes #6902 2018-03-30 13:43:01 -07:00
Dominik Picheta
9c2cdc94a2 Fixes #7433. 2018-03-29 11:57:53 +01:00
Yuriy Glukhov
1bd0efb067 Fixed crash/interface. Added tests. 2018-03-15 15:49:41 +02:00
twetzel59
9079517d71 Resolves #5588: adds openFileStream proc that throws on failure (#7282) 2018-03-04 17:30:28 +01:00
data-man
b30b920751 Fix date parsing for a bad inputs 2018-02-19 16:57:17 +03:00
Oscar Nihlgård
8247323860 Fix json.to for types with generic parameters 2018-02-11 23:15:04 +01:00
Dominik Picheta
1a565d7b20 Merge pull request #6517 from FedericoCeratto/hexstr
Add string-to-hex and back conversions
2018-01-26 15:32:28 +00:00
Araq
9a60eae631 fixes #7078 2018-01-14 23:49:53 +01:00
Araq
425f221440 Merge branch 'devel' of github.com:nim-lang/Nim into devel 2018-01-11 18:05:26 +01:00
Araq
fb8def869c rename strformat.fmt to % as it works better with backslash escape sequences; refs #6958 2018-01-11 18:05:14 +01:00
Dominik Picheta
24cae4addb Merge pull request #7033 from GULPF/allow-timezone-closures
Allow timezone procs to be closures
2018-01-10 17:45:29 +00:00
Oscar Nihlgård
624bd847fb Add test case 2018-01-09 00:33:39 +01:00
Oscar Nihlgård
c344fb311d Allow timezone procs to be closures 2018-01-05 10:07:46 +01:00
Araq
8bcaadc9e4 memfiles: enable test; refs #6361 2018-01-03 13:31:03 +01:00
Mathias Stearn
6bd3a2826f cmp(x, y: string) now uses memcmp rather than strcmp (#6869) (#6968) 2017-12-24 15:23:17 +01:00
Dominik Picheta
8d992c4176 Merge pull request #6725 from FedericoCeratto/unittest-5114
Add unittest suite/test name filters
2017-12-22 15:26:45 +00:00
skilchen
a89b81eb96 fixes #6353 (#6951) 2017-12-21 16:32:26 +01:00
GULPF
a879973081 Better times module (#6552)
* 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
2017-12-18 23:11:28 +01:00
Araq
8caa3df1c3 Merge branch 'parsesql' of https://github.com/treeform/Nim into treeform-parsesql 2017-12-15 16:49:59 +01:00
Andreas Rumpf
e92883466a Merge branch 'devel' of github.com:nim-lang/Nim into devel 2017-12-15 00:36:41 +01:00
treeform
ee5a76fd9d fix 2017-12-14 18:36:18 +00:00
treeform
08d7b5d031 fix 2017-12-14 18:36:17 +00:00
treeform
c6b33de127 fix 2017-12-14 18:36:17 +00:00
Fabian Keller
6df6ec27ec Improved collection-to-string behavior (#6825) 2017-12-14 14:02:13 +01:00
Andreas Rumpf
e860334377 added SQL parser test 2017-12-14 12:46:09 +01:00
Dominik Picheta
578ab935cb Support all int, uint and float variants in json.to macro. 2017-11-30 21:34:30 +00:00
Dominik Picheta
2bb2e6975e Fix infinite recursion when using json.to on ref with cycle. 2017-11-30 21:34:30 +00:00
Dominik Picheta
8d61262372 Implement support for JsonNode in json.to. 2017-11-30 21:34:30 +00:00
Dominik Picheta
8187e83645 Implement Table/OrderedTable support for json.to macro. 2017-11-30 21:34:30 +00:00
Dominik Picheta
8ca41ce637 Implement support for Option[T] in json.to macro. Fixes #5848. 2017-11-30 21:34:30 +00:00
Dominik Picheta
d3c9b58c00 Fixes #6604. Rejects unnamed tuples with error. 2017-11-30 21:34:30 +00:00
Dominik Picheta
e0681715dc Fixes #6095. 2017-11-30 21:34:30 +00:00
Dominik Picheta
11fcae5705 Fixes #5856. Code based on @loloiccl's PR (#5879). 2017-11-30 21:34:30 +00:00
Dominik Picheta
b74a5148a9 Fixes #6223. 2017-11-28 14:33:53 +00:00
Federico Ceratto
25831a83d7 Add unittest suite/test name filters
Support simple globbing
2017-11-28 13:12:23 +00:00
Federico Ceratto
4100932a4b Add string-to-hex and back conversions
Add parseHexStr and toHex and tests.
2017-11-27 16:43:41 +00:00
Andreas Rumpf
58187f2120 added a warning that the .deprecate statement is unreliable for routines 2017-11-21 11:27:35 +01:00
Fredrik Høisæther Rasch
3d5d6931f0 Appveyor thttpclient (#6744)
* App option value for disabling tests for AppVeyor

* Disable thttpclient on AppVeyor
2017-11-15 17:25:48 +01:00
Andreas Rumpf
4ea09e4df5 attempt to make travis green again 2017-11-05 21:44:22 +01:00