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

wix-design-systems-locale-utils

Package Overview
Dependencies
Maintainers
10
Versions
166
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.145.0
  • npm
  • Socket score

Version published
Weekly downloads
965
increased by6.39%
Maintainers
10
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';

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';

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';

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';

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

getYear

returns formatted year

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

const time = dateTimeFormat.getYear('ko', new Date('2022')); // "2022년"

FAQs

Package last updated on 21 Apr 2024

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