DayJS Introduction and Installation Last Updated : 08 Feb, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report Day js is a lightweight date and time manipulation library. It is an alternative to moment js with the same modern API. The latest version of day js has a size of 7Kb (minified) and 2Kb (Gzipped). Due to its small size, it takes less time to load and thus improving the overall performance of the application. Features: It is easy to use and since it has the same API as moment js it is very much easy to work with it.It has gained a lot of popularity because of its small size. Installation of DayJS: You can visit "https://day.js.org/docs/en/installation/installation" for the documentation. The package can be installed with this command.npm install dayjsYou can also add a CDN link to your project. The link is given below. <script src="https://unpkg.com/[email protected]/dayjs.min.js"></script> After installing, you can check the installed version of the package with this command.npm ls dayjsTo start working with DayJS create a file with the name index.js. The package can be included in the index.js with this command.const dayjs = require('dayjs'); Project Structure: The project structure will look like below image. Filename- index.js: JavaScript const dayjs = require('dayjs'); // 2021-02-08T03:08:30+05:30 - ISO 8601 standard console.log(dayjs().format()); // 08 February 2021, 03:08:30 AM console.log(dayjs().format('DD MMMM YYYY, hh:mm:ss A')); // 08-02-2021 console.log(dayjs().format('DD-MM-YYYY')); // Monday console.log(dayjs().format('dddd')); // Feb console.log(dayjs().format('MMM')); // Feb 8th,21 console.log(dayjs().format("MMM D[th],YY")); Run the file: In the terminal run the following command to execute the index.js file. node index.js Output: The MomentJS Module does the same work as DayJS but when you have the performance of web application as the utmost priority, moment js can pose a problem because of its complex API and large bundle size. Dayjs is a great alternative to moment js with a very small size as compared to the moment js. So, this is how we can use DayJS in our application to manipulate, validate and display date and time. Comment More infoAdvertise with us Next Article DayJS Introduction and Installation P pritishnagpal Follow Improve Article Tags : Technical Scripter Web Technologies Node.js Technical Scripter 2020 Similar Reads Design and Implementation in Operating System The design of an operating system is a broad and complex topic that touches on many aspects of computer science. This article will cover the design of operating systems in general and then focus on the implementation aspect. Design Goals:Design goals are the objectives of the operating system. They 6 min read Getting Started with CentOS CentOS, short for Community ENTerprise Operating System, is a powerful and widely used Linux distribution known for its stability, security, and open-source nature. Derived from the source code of Red Hat Enterprise Linux (RHEL), CentOS has become a popular choice for server environments and enterpr 7 min read Batch Processing Operating System In the beginning, computers were very large types of machinery that ran from a console table. In all-purpose, card readers or tape drivers were used for input, and punch cards, tape drives, and line printers were used for output. Operators had no direct interface with the system, and job implementat 6 min read Components of Operating System An Operating system is an interface between users and the hardware of a computer system. It is a system software that is viewed as an organized collection of software consisting of procedures and functions, providing an environment for the execution of programs. The operating system manages system s 7 min read 30 Days of Linux : A Complete Guide For Beginners Ever thought of learning the Linux Operating System? Why do software and network engineers love Linux? why Linux is different from others. Well, why don't you find yourself? In the next 30 days, you will learn Linux OS from scratch. Let's get started. In the world of operating systems, Linux stands 6 min read Like