Skip to content

Instantly share code, notes, and snippets.

@asathoor
Created August 27, 2018 10:35
Show Gist options
  • Save asathoor/7a407a700751826cbb912778be571120 to your computer and use it in GitHub Desktop.
Save asathoor/7a407a700751826cbb912778be571120 to your computer and use it in GitHub Desktop.
How to get a month
//document.write('<h3>' + greeting + '</h3>');
// dato
// @url: https://www.w3schools.com/js/js_date_methods.asp
let dagsDato = new Date();
let dag = dagsDato.getDay();
let maaned = dagsDato.getMonth();
console.log(maaned);
let aar = [
'jan','jan','jan','jan','jan','jan','jan','aug'
]
console.log(aar[maaned]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment