Last active
          April 4, 2018 17:30 
        
      - 
      
 - 
        
Save gavinhungry/5d27464c6e687728e04c23f6dbd6531b to your computer and use it in GitHub Desktop.  
    JavaScript Date formats
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // because I can never remember what all of the Date output formats look like | |
| Object.getOwnPropertyNames(Date.prototype).filter(m => m.startsWith('to')).forEach(m => { | |
| console.log(m.padEnd(20), new Date()[m]()); | |
| }); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment