Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ordermentum/samay

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ordermentum/samay

Wrapper for manipulating time with timezone offsets

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Timezone Helper

How to use?
const samay = require('@ordermentum/samay');

let timestamp = timezone('Australia/Sydney');
const date = new Date(); // 2017-06-22T07:46:38.277Z
console.log(timestamp(new Date(), 'DD/MM/YYYY h:mm:ss a')); // 22/06/2017 5:46:38 pm

timestamp = timezone('Blaah');
console.log(timestamp(new Date(), 'DD/MM/YYYY h:mm:ss a')); // null

console.log(samay('Asia/Tokyo')(date, 'DD/MM/YYYY h:mm:ss [at] a')) // 22/06/2017 at 4:46:38 pm

FAQs

Package last updated on 22 Jun 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc