Skip to content
JS
Package

mockdate

A JavaScript mock Date object that can be used to change when "now" is.

v3.0.5, 25 Mar 2021MITCommonJSTypes: BundledTestingDate and time
$ npm install mockdate

Key numbers

As of 25 Sept 2026
Weekly downloads
2m
+21% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
0
Direct, from package.json
Last release
5 years ago
v3.0.5
GitHub stars
679
54 forks
Open issues / PRs
1 / 16
Contributors
-
Commits, last 52 weeks
0

Downloads

Last week 2026-09-15 to 2026-09-21
01m2m3mSept 2025Mar 2026Sept 2026High 2.9m (25 Aug 2026)Low 815.4k (23 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

1,951,247 downloads last week, 8,927,620 in the last month. The 12-month change of +21% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
019 in total
Latest version
3.0.5, 25 Mar 20215 years ago
First published
17 Mar 2014
Last push to GitHub
31 Aug 2024754 days before the snapshot
Repository archived
No
Open issues
1
Open pull requests
16
Commits, last 52 weeks
0
Dependents on npm
183

Major versions

  1. v3 first release 3.0.0, 20 May 2020
  2. v2 first release 2.0.0, 31 Oct 2016
  3. v1 first release 1.0.0, 24 Jun 2014
  4. v0 first release 0.0.1, 17 Mar 2014

Recent releases

VersionPublished
3.0.525 Mar 2021
3.0.418 Mar 2021
3.0.315 Mar 2021
3.0.221 May 2020
3.0.121 May 2020
3.0.020 May 2020
2.0.59 Aug 2019
2.0.431 Jul 2019
2.0.314 Jun 2019
2.0.217 Aug 2017
2.0.122 Nov 2016
2.0.031 Oct 2016
1.0.42 Feb 2016
1.0.320 Apr 2015
Module format
CommonJSFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
Not declared
Runtimes
-
Unpacked size (npm)
13 kB
Dependencies (0)
None
npm install mockdate

CDN

jsDelivr: 121k requests in 30 days
  • jsDelivrhttps://cdn.jsdelivr.net/npm/mockdate@3.0.5/
  • unpkghttps://unpkg.com/mockdate@3.0.5/
  • esm.shhttps://esm.sh/mockdate@3.0.5
PackageWeekly downloadsGzipLast releaseModuleComparison
timemachine44.2k-5 years agoCommonJS-
@vitest/mocker71.9m-9 days agoESM only-
pusher-js-mock88k-1 year agoCommonJS-
mocked-env75.4k-5 years agoCommonJS-
Sources: npm registry, npm downloads API, GitHub API, jsDelivr. Data fetched 25 Sept 2026.

Indexability: Indexed.