utcstring

WebJar for utcstring

License

License

GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

utcstring
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

utcstring
WebJar for utcstring
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/seanmonstar/utcstring

Download utcstring

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/utcstring/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>utcstring</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/utcstring/
implementation 'org.webjars.npm:utcstring:0.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/utcstring/
implementation ("org.webjars.npm:utcstring:0.1.0")
'org.webjars.npm:utcstring:jar:0.1.0'
<dependency org="org.webjars.npm" name="utcstring" rev="0.1.0">
  <artifact name="utcstring" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='utcstring', version='0.1.0')
)
libraryDependencies += "org.webjars.npm" % "utcstring" % "0.1.0"
[org.webjars.npm/utcstring "0.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

utcstring

Build Status NPM version

UTC date format utilities.

Usage

var utc = require('utcstring');

utc() // now in UTC string format
utc(new Date()) // date in UTC string; same as (new Date).toUTCString();

utc.is('Thu, 30 Oct 2013 11:15:21 GMT') // returns true
utc.is('Thu, 30 Oct 2013') // returns false

utc.has('Today is Thu, 30 Oct 2013 11:15:21 GMT, hurray!') // true

utc.match('Today is Thu, 30 Oct 2013 11:15:21 GMT, hurray!') // ['Thu, 30 Oct 2013 11:15:21 GMT']

// essentially utc.match()[0]
utc.get('Today is Thu, 30 Oct 2013 11:15:21 GMT, hurray!') // 'Thu, 30 Oct 2013 11:15:21 GMT'

// checks utc.is(str) before parsing as Date
utc.from('Thu, 30 Oct 2013 11:15:21 GMT') // Date instance
utc.from('2013-10-30') // null

License

MPLv2.0

Versions

Version
0.1.0