Socket
Book a DemoInstallSign in
Socket

wix-design-systems-locale-utils

Package Overview
Dependencies
Maintainers
8
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wix-design-systems-locale-utils

> A common utils used within the `wix-design-systems` packages

1.2.0
npmnpm
Version published
Weekly downloads
1.8K
-20.61%
Maintainers
8
Weekly downloads
 
Created
Source

wix-design-systems-locale-utils

A common utils used within the wix-design-systems packages

Locale utils

The following helper functions can be used within the different wix-design-systems packages:

getShortDate

returns short date format approved by Wix Localization team

import { dateTimeFormat } from 'wix-design-systems-locale-utils/dateTimeFormat';

const date = dateTimeFormat.getShortDate('lt', new Date('2021/08/13')); //"2021-08-13"

getMediumDate

returns medium date format approved by Wix Localization team

import { dateTimeFormat } from 'wix-design-systems-locale-utils/dateTimeFormat';

const date = dateTimeFormat.getMediumDate('tr', new Date('2021/08/13')); //"21 Tem 2021"

getShortTime

returns short time format approved by Wix Localization team

import { dateTimeFormat } from 'wix-design-systems-locale-utils/dateTimeFormat';

const time = dateTimeFormat.getShortTime('lt', new Date('2021/08/12 16:45')); //"16:45"

getLongTime

returns long time format approved by Wix Localization team

import { dateTimeFormat } from 'wix-design-systems-locale-utils/dateTimeFormat';

const time = dateTimeFormat.getLongTime('tr', new Date('2021/08/12 16:45')); //"ÖS 4:45 GMT+3"

FAQs

Package last updated on 02 Sep 2021

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.