summary refs log tree commit diff stats
path: root/lib/pure/random.nim
Commit message (Collapse)AuthorAgeFilesLines
* Fixed crash in rand (#7103)Yuriy Glukhov2018-01-181-0/+5
|
* Better times module (#6552)GULPF2017-12-181-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* make JS tests green againAraq2017-12-151-1/+1
|
* many improvements to random.nim; fixes #4726Araq2017-12-141-26/+97
|
* fixes #6631Andreas Rumpf2017-10-301-1/+1
|
* work in progress: new implementation for 'a[^1]'Andreas Rumpf2017-10-291-1/+1
|
* Fixed randomize for 32bit target (#6167)Yuriy Glukhov2017-08-011-2/+2
|
* fixes #5966Fabian Keller2017-06-201-1/+2
|
* fixes #5430Araq2017-02-261-1/+1
|
* fixed bug when the first random(max: float) call is the same value, ↵Vladar42017-01-201-0/+1
| | | | regardless of randomize() (#5257)
* random.shuffle now takes an openArray procAndreas Rumpf2017-01-111-2/+7
|
* Documented `shuffle` from `random` module (#5204)Benjamin Summerton2017-01-111-0/+1
|
* make random.nim work for the JS target againAraq2017-01-081-2/+4
|
* random.nim: added shuffle proc; fixes 'mod' biasAraq2017-01-081-2/+12
|
* random.nim: add a warning about crypo; refs #5047Araq2017-01-071-0/+1
|
* Fix few typosFederico Ceratto2016-10-171-2/+2
|
* Random module: fix links, improve header.Matthew Baulch2016-07-181-5/+4
|
* documentation build cleaned upAndreas Rumpf2016-05-311-3/+5
|
* make test greenAndreas Rumpf2016-05-301-20/+38
|
* moved random procs from math to its own module (breaking change)Andreas Rumpf2016-05-301-0/+23
|
* added pure Nim random stdlib moduleAndreas Rumpf2016-05-301-0/+86