Skip to content
This moment.ts was ported from moment.js@2.24.0.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
vendor
.gitignore Update some files. Mar 25, 2019
.travis.yml
LICENSE
README.md Update some files. Mar 25, 2019
moment.ts
test.ts Update some files. Mar 25, 2019
tsconfig.json Update some files. Mar 25, 2019

README.md

Moment.ts

The Moment.ts library for Deno that was ported from moment@2.24.0, Hope you like it.

Usage

Some cases on the moment.js official website:

Import

import { moment } from "https://deno.land/x/moment/moment.ts";
// or
import { moment } from "https://raw.githubusercontent.com/lisniuse/deno_moment/master/moment.ts";

Cases

// "2014-09-08T08:02:17-05:00" (ISO 8601)
moment().format();
// "Sunday, February 14th 2010, 3:25:50 pm"
moment().format("dddd, MMMM Do YYYY, h:mm:ss a");
// "Sun, 3PM"
moment().format("ddd, hA");
// "Invalid date"
moment("gibberish").format("YYYY MM DD");
You can’t perform that action at this time.