1.0.6 • Published 4 months ago

@etugbeh/php-date-format v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

php-date-format

A node package for formatting dates in JavaScript using PHP syntax.

  • No dependencies package
  • No TypeScript support (yet)
  • Use CommonJS import syntax

Installation

npm install @etugbeh/php-date-format

Usage

const date_format = require("@etugbeh/php-date-format");

// Jan 7, 2024 (current date)
console.log(date_format());

// Tue, Sep 15, 1992
console.log(date_format("1992-09-15", "D, M j, Y"));

// 1970/01/01 12:00 AM
console.log(date_format("1970-01-01T00:00:00.000Z", "Y/m/d h:i A"));

Documentation

https://www.w3schools.com/php/func_date_date_format.asp

The date_format() function returns a date formatted according to the specified format.

Note: This function does not use locales (all output is in English).

Tip: Also look at the date() function, which formats a local date/time.

1.0.6

4 months ago

1.0.5

4 months ago

1.0.4

4 months ago

1.0.3

4 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago