
Security News
Open VSX Begins Implementing Pre-Publish Security Checks After Repeated Supply Chain Incidents
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.
@packfleet/datetime
Advanced tools
A comprehensive datetime library that wraps @js-temporal/polyfill, providing a rich set of utilities for date and time manipulation, formatting, and parsing.
npm install @packfleet/datetime
# or
yarn add @packfleet/datetime
# or
pnpm add @packfleet/datetime
# or
bun install @packfleet/datetime
@js-temporal/polyfill for modern date/time handlingimport { formatFriendlyIso8601DateTimeStr, formatIso8601ToFriendlyDate } from '@packfleet/datetime';
// Format a datetime string in a friendly way
formatFriendlyIso8601DateTimeStr('2024-03-12T23:59:59.123Z', 'Europe/London');
// "Wednesday 12th March 2024 at 23:59"
// Format just the date
formatIso8601ToFriendlyDate('2024-03-12T23:59:59.123Z', 'Europe/London');
// "12 March 2024"
import { parseInstant, parsePlainDateTime } from '@packfleet/datetime';
// Parse an ISO 8601 string to an Instant
const instant = parseInstant('2024-03-12T23:59:59.123Z');
// Parse to a PlainDateTime
const dateTime = parsePlainDateTime('2024-03-12T23:59:59.123');
import { nowLocal, todayLocal } from '@packfleet/datetime';
// Get current time in a specific timezone
const now = nowLocal('Europe/London');
// Get today's date in a specific timezone
const today = todayLocal('Europe/London');
import { toJSDateUTC, toPlainDate } from '@packfleet/datetime';
// Convert Temporal types to JavaScript Date
const jsDate = toJSDateUTC(instant);
// Convert JavaScript Date to Temporal PlainDate
const plainDate = toPlainDate(new Date(), 'Europe/London');
This library has been in use by Packfleet in production for multiple years. However, please note that the Temporal API spec may still change, as it's a relatively new addition to JavaScript.
MIT
FAQs
A package for working with dates and times.
The npm package @packfleet/datetime receives a total of 30 weekly downloads. As such, @packfleet/datetime popularity was classified as not popular.
We found that @packfleet/datetime demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.

Research
/Security News
Threat actors compromised four oorzc Open VSX extensions with more than 22,000 downloads, pushing malicious versions that install a staged loader, evade Russian-locale systems, pull C2 from Solana memos, and steal macOS credentials and wallets.

Security News
Lodash 4.17.23 marks a security reset, with maintainers rebuilding governance and infrastructure to support long-term, sustainable maintenance.