New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

php-date-format

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

php-date-format

A node.js package for PHP style format date.

latest
Source
npmnpm
Version
1.0.7
Version published
Maintainers
1
Created
Source

php-date-format

NPM

A node.js package for PHP style format date.

  • No dependencies package
  • Support escape

Installation

npm install php-date-format

Usage

var format = require('php-date-format');
// defaults to ISO8601 format and current date
format();
// output: 2024-01-03T15:04:13.020+09:00

// time
format('H:i:s.v', new Date('2024-01-13T15:04:13.02+09:00'));
// output: 15:04:13.020

// week dates
format('Y-\\WW-N');
// ouptut: 2024-W01-3

// RFC 2822 / RFC 5322 formatted date
format('r');
format('D, d M Y H:i:s O');
// output: Wed, 03 Jan 2024 15:04:13 +0900

Formats

Should support most PHP date formats, see https://www.php.net/manual/en/datetime.format.php

Note

  • Only support local time
  • Timezone format (O, P, p) returns local tz (process.env.TZ)
  • Timezone abbreviation (T) does not support. Returns UTC or GMT+0900

Keywords

date

FAQs

Package last updated on 02 Feb 2024

Did you know?

Socket

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.

Install

Related posts