An error occurred while loading the file. Please try again.
-
Erik Erikson authored
Used the year, month, and day modulo the length of the dino art to select the proper art for the day. Use localized day. Add brontosaurus and tyranosaurus. Bug: not entirely aligned to speech bubble. Hoping no one was feeling married to the simple dino art.
44f1dd58
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
'use strict';
module.exports = dino;
const dinos = [
' __' + '\n' +
' / _)' + '\n' +
' _/\\/\\/\\_/ /' + '\n' +
' _| /' + '\n' +
' _| ( | ( |' + '\n' +
'/__.-\'|_|--|_|' + '\n',
' __ \n' +
' / _) \n' +
' .-^^^-/ / \n' +
' __/ / \n' +
'<__.|_|-|_|',
' .@\n' +
' @.+\n' +
' @,\n' +
' @\'\n' +
' @\'\n' +
' @;\n' +
' `@;\n' +
' @+;\n' +
' .@#;\'\n' +
' #@###@;\'.\n' +
' :#@@@@@;.\n' +
' @@@+;\'@@:\n' +
' `@@@\';;;@@\n' +
' @;:@@;;;;+#\n' +
'`@;` ,@@,, @@`\n' +
' @`@ @`+\n' +
' @ , @ @\n' +
' @ @ @ @',
' ..`\n' +
' ;:,\'+;\n' +
' ,;;,,;,\n' +
' #:;\':\n' +
' @\';\'+;\n' +
' `::;\'\'\';\n' +
' \'; ,:\'+;;\n' +
' `,,` .;\';\'+;\'\n' +
' ; `\'+;;;::\';++\':,;\n' +
' `+++++##+\'\';#\n' +
' .;+##+\'\'\';\n' +
' \'+##\'\'\'#\'\n' +
' ++# +;\'.##\n' +
' ##, `: .#,\n' +
' :# \'+\n' +
' #. \'\n' +
' # +\n' +
' :+ #\'\n' +
' #+` \';.'
];
function dino(options) {
const balloon = !options.quiet ?
' ____________\n' +
'< artillery! >\n' +
' ------------\n'
:
' _______________________\n' +
7172737475767778798081828384
'< You can\'t silence me! >\n' +
' -----------------------\n';
console.log(balloon +
' \\\n' +
' \\');
let today = new Date();
let year = today.getFullYear();
let month = today.getMonth() + 1;
let day = today.getDate();
let i = year * month * day % dinos.length;
console.log(dinos[i]);
}