1.0.5 • Published 5 years ago

todayfromsystem v1.0.5

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

TodayFromSystem

Usage

NodeJS

Without Month Day Year

Template

const today = require("TodayFromSystem");

console.log(today.date()); //15:16

Module index.js content

exports.date = function() {
  const hours = new Date().getHours();
  const minutes = new Date().getMinutes();
  const Day = new Date().getDay();
  const Month = new Date().getMonth();
  const Year = new Date().getFullYear();
  const Time = hours + ":" + minutes;
  const date = Day + "." + Month + "." + Year;
  return Time;

With Month , Day and Year

Template

const today = require("TodayFromSystem");

console.log(today.date()); //06.06.2019

Module index.js content

exports.date = function() {
  const hours = new Date().getHours();
  const minutes = new Date().getMinutes();
  const Day = new Date().getDay();
  const Month = new Date().getMonth();
  const Year = new Date().getFullYear();
  const Time = hours + ":" + minutes;
  const date = Day + "." + Month + "." + Year;
  return date;
}