RandomDateTime class
Random generator for Date time values.
Example
var value1 = RandomDateTime.nextDate( Date(2010,0,1)); // Possible result: 2008-01-03
var value2 = RandomDateTime.nextDateTime( Date(2017,0.1));// Possible result: 2007-03-11 11:20:32
var value3 = RandomDateTime.updateDateTime( Date(2010,1,2));// Possible result: 2010-02-05 11:33:23
Constructors
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited
Static Methods
-
nextDate(
DateTime min, [ DateTime max ]) → DateTime -
Generates a random Date in the range
'min', 'max'
. This method generate dates without time (or time set to 00:00:00) [...] -
nextDateTime(
DateTime min, [ DateTime max ]) → DateTime -
Generates a random Date and time in the range
'min', 'max'
. This method generate dates without time (or time set to 00:00:00) [...] -
updateDateTime(
DateTime value, [ int range ]) → DateTime - Updates (drifts) a Date value within specified range defined [...]