momentizer
v1.0.0
Published
A very simple library that get the date, etc..
Readme
Library Documentation: Momentizer
Overview
The momentizer library is a lightweight JavaScript library designed to simplify date and time operations in your projects.
It provides easy-to-use functions for retrieving the current date and time, as well as adding days to a given date.
Installation
To use the momentizer library in your project, simply install the momentizer library with npmjs and include it in your project directory.
Usage
getCurrentDate()
Retrieves the current date in the format YYYY-MM-DD.
const datatime = require('momentizer');
const currentDate = datatime.getCurrentDate();
console.log('Current date:', currentDate);getCurrentTime()
Retrieves the current time in the format HH:MM:SS.
const datatime = require('momentizer');
const currentTime = datatime.getCurrentTime();
console.log('Current time:', currentTime);addDays(date, days)
Adds a specified number of days to the given date.
const datatime = require('momentizer');
const currentDate = datatime.getCurrentDate();
const futureDate = datatime.addDays(currentDate, 7);
console.log('Future date:', futureDate);Example
const datatime = require('momentizer');
const currentDate = datatime.getCurrentDate();
const currentTime = datatime.getCurrentTime();
const futureDate = datatime.addDays(currentDate, 7);
console.log('Current date:', currentDate);
console.log('Current time:', currentTime);
console.log('Future date:', futureDate);Feel free to ask questions!
