The following code snippet will output a date with a format like this pattern:
MM/DD/YYYY HH:MM (AM/PM)
For example:
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>My Angular from Scratch</title> | |
| <style> | |
| .my-component { | |
| font-family: Arial, sans-serif; | 
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Dice</title> | |
| <style type="text/css"> | |
| body { | |
| margin: 1em auto; | |
| max-width: 40em; | |
| width: 88%; | 
| Seven different types of CSS attribute selectors | |
| // This attribute exists on the element | |
| [value] | |
| // This attribute has a specific value of cool | |
| [value='cool'] | |
| // This attribute value contains the word cool somewhere in it | |
| [value*='cool'] | 
| $screen-sizes: ( | |
| xxl: 1920px, | |
| xl: 1440px, | |
| l: 1360px, | |
| ml: 1280px, | |
| m: 768px, | |
| s: 576px | |
| ); | |
| $col-count: 24; | 
| self.addEventListener('install', (e) => { | |
| e.waitUntil( | |
| caches.open("precache").then((cache) => cache.add("/broken.png")) | |
| ); | |
| }); | |
| function isImage(fetchRequest) { | |
| return fetchRequest.method === "GET" && fetchRequest.destination === "image"; | |
| } | 
| (function (context, trackingId, options) { | |
| const history = context.history; | |
| const doc = document; | |
| const nav = navigator || {}; | |
| const storage = localStorage; | |
| const encode = encodeURIComponent; | |
| const pushState = history.pushState; | |
| const typeException = 'exception'; | |
| const generateId = () => Math.random().toString(36); | |
| const getId = () => { | 
| :root { | |
| /* CONSTANTS */ | |
| --FONT-SIZE-MIN: 16; | |
| --FONT-SIZE-MAX: 26; | |
| /* Notice, no calcs used yet */ | |
| --FONT-SIZE-MIN-PX: (var(--FONT-SIZE-MIN) * 1px); | |
| --FONT-SIZE-MAX-PX: (var(--FONT-SIZE-MAX) * 1px); | |
| --BROWSER-WIDTH-MIN: 300; |