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

@fluentui/date-time-utilities

Package Overview
Dependencies
Maintainers
0
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/date-time-utilities

Date-time utilities

  • 8.6.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
138K
increased by0.95%
Maintainers
0
Weekly downloads
 
Created

What is @fluentui/date-time-utilities?

@fluentui/date-time-utilities is a utility library for handling date and time operations, commonly used in conjunction with Fluent UI components. It provides a range of functions for date and time manipulation, formatting, and parsing.

What are @fluentui/date-time-utilities's main functionalities?

Date Arithmetic

This feature allows you to perform arithmetic operations on dates, such as adding days or months to a given date.

const { addDays, addMonths } = require('@fluentui/date-time-utilities');
const today = new Date();
const nextWeek = addDays(today, 7);
const nextMonth = addMonths(today, 1);
console.log(nextWeek, nextMonth);

Date Formatting

This feature provides functions to format dates into various string representations.

const { formatDate } = require('@fluentui/date-time-utilities');
const today = new Date();
const formattedDate = formatDate(today, 'MM/DD/YYYY');
console.log(formattedDate);

Date Parsing

This feature allows you to parse date strings into JavaScript Date objects based on a specified format.

const { parseDate } = require('@fluentui/date-time-utilities');
const dateString = '2023-10-01';
const parsedDate = parseDate(dateString, 'YYYY-MM-DD');
console.log(parsedDate);

Date Comparison

This feature provides functions to compare two dates, returning whether one is before, after, or the same as the other.

const { compareDates } = require('@fluentui/date-time-utilities');
const date1 = new Date('2023-10-01');
const date2 = new Date('2023-10-02');
const comparisonResult = compareDates(date1, date2);
console.log(comparisonResult);

Other packages similar to @fluentui/date-time-utilities

FAQs

Package last updated on 24 Jun 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