This file contains 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
var date = new Date(); | |
var locale = 'en-us'; | |
var month = date.toLocaleString(locale, {month: 'long'}); | |
var weekday = date.toLocaleString(locale, {weekday: 'long'}); |
This file contains 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
function imageToBlob(image) { | |
// Create a canvas to render the image on | |
var canvas = document.createElement('canvas'); | |
canvas.width = image.width; | |
canvas.height = image.height; | |
// Create a context and render the image | |
var ctx = canvas.getContext('2d'); | |
ctx.drawImage(image, 0, 0, image.width, image.height); |