Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to make a single digit date start with zero

const today = new Date()

const year = today.getFullYear()

const month = `${today.getMonth() + 1}`.padStart(2, "0")

const day = `${today.getDate()}`.padStart(2, "0")

const stringDate = [day, month, year].join("/") // 13/12/2017
Comment

PREVIOUS NEXT
Code Example
Shell :: check for installed chaincode 
Shell :: ubuntu fix wrong lsb_release 
Shell :: command to open snap gui 
Shell :: ajouter tag github 
Shell :: zsh print each line of script 
Shell :: permanent noh vim 
Shell :: git checkout filename 
Shell :: leave azure ad cmd 
Shell :: Vim deleting all lines containing pattern 
Shell :: install wp from wp-cli 
Shell :: Add base url to react router for gh-pages deployment 
Shell :: v4l2 not found 
Shell :: active command line macbook developer 
Shell :: linux find type of desktop 
Shell :: Exception: No Linux desktop project configured. 
Shell :: npm list commands 
Shell :: very strong ssh encryption key 
Shell :: Error: path "" is not a descendant of mount point root "" and cannot be exposed from 
Shell :: ubuntu check gstreamer version 
Shell :: ionic 4 image zoom 
Shell :: docker buildx build --platform linux/amd64,linux/arm64 -t username/application:latest --push . 
Shell :: dmesg watch command linxu 
Shell :: ubuntu psql: error: FATAL: Peer authentication failed for user 
Shell :: how to see map of branches in git 
Shell :: ghc change version 
Shell :: how to install automapper in vs code 
Shell :: linux repeat command every second 
Shell :: how to run a code in github 
Shell :: dokcer not working 
Shell :: platform cli 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =