
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
@evokegroup/dateformat
Advanced tools
Adds date string formating to the Date prototype
Array of month names in english
Maps month names to the numeric month
Array of day names in english
Maps day names to the numeric day
Outputs a Date into a string of given format
| Parameter | Type | Default | Description |
|---|---|---|---|
| formatString | string | The string format. See Format String section for details. | |
| makeUTC | boolean | false | Output the date string as UTC |
| String | Description |
|---|---|
| d | The day of the month, from 1 through 31 |
| dd | The day of the month, from 01 through 31. |
| ddd | The abbreviated name of the day of the week. |
| dddd | The full name of the day of the week. |
| f | The tenths of a second. |
| ff | The hundredths of a second. |
| fff | The milliseconds. |
| h | The hour, using a 12-hour clock from 1 to 12. |
| hh | The hour, using a 12-hour clock from 01 to 12. |
| H | The hour, using a 24-hour clock from 0 to 23. |
| HH | The hour, using a 24-hour clock from 00 to 23. |
| m | The minute, from 0 through 59. |
| mm | The minute, from 00 through 59. |
| M | The month, from 1 through 12. |
| MM | The month, from 01 through 12. |
| MMM | The abbreviated name of the month. |
| MMMM | The full name of the month. |
| s | The second, from 0 through 59. |
| ss | The second, from 00 through 59. |
| t | The first character of the AM/PM designator. |
| tt | The AM/PM designator. |
| yy | The year, from 00 to 99. |
| yyyy | The year as a four-digit number. |
require('@evokegroup/dateformat');
const date = new Date('7/8/2020 14:43');
console.log(date.toStringFormat('MMMM d, yyyy h:mm tt')); // Expected output: July 8, 2020 2:43 PM
Outputs a UTC Date into a string of given format. See Date.prototype.toStringFormat
FAQs
Date string formating
We found that @evokegroup/dateformat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated “elf-*” npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Research
/Security News
Malicious Rust crate evm-units disguised as an EVM version helper downloads and silently executes OS-specific payloads likely aimed at crypto theft.