1.0.5 • Published 5 years ago

time-context v1.0.5

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
5 years ago

time-context

使い方

const TimeContext = require('time-context');

const timeContext = new TimeContext('2019-01-01 00:00:00', '2019-01-31 23:59:59');
timeContext.change(() => {
  console.log(new Date());
  // 2019-01-01 00:00:00 ~ 2019-01-31 23:59:59 の間で決定されたランダムな時間がnew Dateで出力されます。
});


console.log(new Date());
// changeメソッド以外の範囲では現在時刻が表示されます。
1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago