drizzle-seed 0.3.1-dc3b366 → 0.3.1-e2b296d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +4 -4
- package/index.cjs.map +1 -1
- package/index.mjs +6 -6
- package/index.mjs.map +1 -1
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -131837,7 +131837,7 @@ class GenerateTime extends AbstractGenerator {
|
|
|
131837
131837
|
const oneDayInMilliseconds = 86400000;
|
|
131838
131838
|
let date = new Date();
|
|
131839
131839
|
let milliseconds;
|
|
131840
|
-
[milliseconds, this.state.rng] = prand.uniformIntDistribution(-
|
|
131840
|
+
[milliseconds, this.state.rng] = prand.uniformIntDistribution(-864e5, oneDayInMilliseconds, this.state.rng);
|
|
131841
131841
|
date = new Date(date.setTime(anchorDateTime.getTime() + milliseconds));
|
|
131842
131842
|
return date.toISOString().replace(/(\d{4}-\d{2}-\d{2}T)|(\.\d{3}Z)/g, '');
|
|
131843
131843
|
}
|
|
@@ -131858,7 +131858,7 @@ class GenerateTimestamp extends AbstractGenerator {
|
|
|
131858
131858
|
const twoYearsInMilliseconds = 2 * 31536000000;
|
|
131859
131859
|
let date = new Date();
|
|
131860
131860
|
let milliseconds;
|
|
131861
|
-
[milliseconds, this.state.rng] = prand.uniformIntDistribution(-
|
|
131861
|
+
[milliseconds, this.state.rng] = prand.uniformIntDistribution(-63072e6, twoYearsInMilliseconds, this.state.rng);
|
|
131862
131862
|
date = new Date(date.setTime(anchorTimestamp.getTime() + milliseconds));
|
|
131863
131863
|
if (this.dataType === 'string') {
|
|
131864
131864
|
return date
|
|
@@ -131885,7 +131885,7 @@ class GenerateDatetime extends AbstractGenerator {
|
|
|
131885
131885
|
const twoYearsInMilliseconds = 2 * 31536000000;
|
|
131886
131886
|
let date = new Date();
|
|
131887
131887
|
let milliseconds;
|
|
131888
|
-
[milliseconds, this.state.rng] = prand.uniformIntDistribution(-
|
|
131888
|
+
[milliseconds, this.state.rng] = prand.uniformIntDistribution(-63072e6, twoYearsInMilliseconds, this.state.rng);
|
|
131889
131889
|
date = new Date(date.setTime(anchorDate.getTime() + milliseconds));
|
|
131890
131890
|
if (this.dataType === 'string') {
|
|
131891
131891
|
return date
|
|
@@ -131912,7 +131912,7 @@ class GenerateYear extends AbstractGenerator {
|
|
|
131912
131912
|
const tenYears = 10;
|
|
131913
131913
|
let date = new Date();
|
|
131914
131914
|
let years;
|
|
131915
|
-
[years, this.state.rng] = prand.uniformIntDistribution(-
|
|
131915
|
+
[years, this.state.rng] = prand.uniformIntDistribution(-10, tenYears, this.state.rng);
|
|
131916
131916
|
date = new Date(date.setFullYear(anchorDate.getFullYear() + years));
|
|
131917
131917
|
return date
|
|
131918
131918
|
.toISOString()
|