Skip to content

Instantly share code, notes, and snippets.

Created November 21, 2017 02:02
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save anonymous/72a4d1d09bdda72abae33a67fbb24fb6 to your computer and use it in GitHub Desktop.
Save anonymous/72a4d1d09bdda72abae33a67fbb24fb6 to your computer and use it in GitHub Desktop.
"use strict";
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var RevDate = function RevDate(dateparse) {
_classCallCheck(this, RevDate);
var moment = new Date();
if (typeof dateparse !== 'undefined') {
moment = new Date(dateparse);
}
var raisin = new Date('22 Sep 1792');
var adjMoment = moment.getTime() - raisin.getTime();
var d = 86400001.47924;
var now = Math.floor(adjMoment % d);
this.hours = Math.floor(now % d * 10 / d);
this.minutes = Math.floor(now % d * 10 % d * 100 / d);
this.seconds = Math.floor(now % d * 10 % d * 100 % d * 100 / d);
var days = Math.floor(adjMoment / d);
this.years = Math.floor(days / 365.2425) + 1;
this.yeardays = Math.ceil(days % 365.2425);
this.date = this.yeardays % 30 + 1; // plus one because the calendar dates start from 1, not 0
this.monthNum = Math.floor(this.yeardays / 30) + 1;
this.month = "";
switch (this.monthNum) {
case 1:
this.month = "Vendémiaire";break;
case 2:
this.month = "Brumaire";break;
case 3:
this.month = "Frimaire";break;
case 4:
this.month = "Nivôse";break;
case 5:
this.month = "Pluviôse";break;
case 6:
this.month = "Ventôse";break;
case 7:
this.month = "Germinal";break;
case 8:
this.month = "Floréal";break;
case 9:
this.month = "Prairial";break;
case 10:
this.month = "Messidor";break;
case 11:
this.month = "Thermidor";break;
case 12:
this.month = "Fructidor";break;
case 13:
this.month = "Sansculottides";break;
}
this.dateStr = "";
switch (this.yeardays + 1) {
case 1:
this.dateStr = "Raisin (Grape)";break;
case 2:
this.dateStr = "Safran (Saffron)";break;
case 3:
this.dateStr = "Châtaigne (Chestnut)";break;
case 4:
this.dateStr = "Colchique (Crocus)";break;
case 5:
this.dateStr = "Cheval (Horse)";break;
case 6:
this.dateStr = "Balsamine (Impatiens)";break;
case 7:
this.dateStr = "Carotte (Carrot)";break;
case 8:
this.dateStr = "Amaranthe (Amaranth)";break;
case 9:
this.dateStr = "Panais (Parsnip)";break;
case 10:
this.dateStr = "Cuve (Vat)";break;
case 11:
this.dateStr = "Pomme de terre (Potato)";break;
case 12:
this.dateStr = "Immortelle (Strawflower)";break;
case 13:
this.dateStr = "Potiron (Winter squash)";break;
case 14:
this.dateStr = "Réséda (Mignonette)";break;
case 15:
this.dateStr = "Âne (Donkey)";break;
case 16:
this.dateStr = "Belle de nuit (Four o'clock flower)";break;
case 17:
this.dateStr = "Citrouille (Pumpkin)";break;
case 18:
this.dateStr = "Sarrasin (Buckwheat)";break;
case 19:
this.dateStr = "Tournesol (Sunflower)";break;
case 20:
this.dateStr = "Pressoir (Wine-Press)";break;
case 21:
this.dateStr = "Chanvre (Hemp)";break;
case 22:
this.dateStr = "Pêche (Peach)";break;
case 23:
this.dateStr = "Navet (Turnip)";break;
case 24:
this.dateStr = "Amaryllis (Amaryllis)";break;
case 25:
this.dateStr = "Bœuf (Ox)";break;
case 26:
this.dateStr = "Aubergine (Eggplant)";break;
case 27:
this.dateStr = "Piment (Chili pepper)";break;
case 28:
this.dateStr = "Tomate (Tomato)";break;
case 29:
this.dateStr = "Orge (Barley)";break;
case 30:
this.dateStr = "Tonneau (Barrel)";break;
case 31:
this.dateStr = "Pomme (Apple)";break;
case 32:
this.dateStr = "Céleri (Celery)";break;
case 33:
this.dateStr = "Poire (Pear)";break;
case 34:
this.dateStr = "Betterave (Beetroot)";break;
case 35:
this.dateStr = "Oie (Goose)";break;
case 36:
this.dateStr = "Héliotrope (Heliotrope)";break;
case 37:
this.dateStr = "Figue (Common fig)";break;
case 38:
this.dateStr = "Scorsonère (Black Salsify)";break;
case 39:
this.dateStr = "Alisier (Chequer Tree)";break;
case 40:
this.dateStr = "Charrue (Plough)";break;
case 41:
this.dateStr = "Salsifis (Salsify)";break;
case 42:
this.dateStr = "Mâcre (Water chestnut)";break;
case 43:
this.dateStr = "Topinambour (Jerusalem artichoke)";break;
case 44:
this.dateStr = "Endive (Endive)";break;
case 45:
this.dateStr = "Dindon (Turkey)";break;
case 46:
this.dateStr = "Chervis (Skirret)";break;
case 47:
this.dateStr = "Cresson (Watercress)";break;
case 48:
this.dateStr = "Dentelaire (Leadworts)";break;
case 49:
this.dateStr = "Grenade (Pomegranate)";break;
case 50:
this.dateStr = "Herse (Harrow)";break;
case 51:
this.dateStr = "Bacchante (Baccharis)";break;
case 52:
this.dateStr = "Azerole (Azarole)";break;
case 53:
this.dateStr = "Garance (Madder)";break;
case 54:
this.dateStr = "Orange (Orange)";break;
case 55:
this.dateStr = "Faisan (Pheasant)";break;
case 56:
this.dateStr = "Pistache (Pistachio)";break;
case 57:
this.dateStr = "Macjonc (Tuberous pea)";break;
case 58:
this.dateStr = "Coing (Quince)";break;
case 59:
this.dateStr = "Cormier (Service tree)";break;
case 60:
this.dateStr = "Rouleau (Roller)";break;
case 61:
this.dateStr = "Raiponce (Rampion)";break;
case 62:
this.dateStr = "Turneps (Turnip)";break;
case 63:
this.dateStr = "Chicorée (Chicory)";break;
case 64:
this.dateStr = "Nèfle (Medlar)";break;
case 65:
this.dateStr = "Cochon (Pig)";break;
case 66:
this.dateStr = "Mâche (Lamb's lettuce)";break;
case 67:
this.dateStr = "Chou-fleur (Cauliflower)";break;
case 68:
this.dateStr = "Miel (Honey)";break;
case 69:
this.dateStr = "Genièvre (Juniper)";break;
case 70:
this.dateStr = "Pioche (Pickaxe)";break;
case 71:
this.dateStr = "Cire (Wax)";break;
case 72:
this.dateStr = "Raifort (Horseradish)";break;
case 73:
this.dateStr = "Cèdre (Cedar tree)";break;
case 74:
this.dateStr = "Sapin (Fir)";break;
case 75:
this.dateStr = "Chevreuil (Roe deer)";break;
case 76:
this.dateStr = "Ajonc (Gorse)";break;
case 77:
this.dateStr = "Cyprès (Cypress Tree)";break;
case 78:
this.dateStr = "Lierre (Ivy)";break;
case 79:
this.dateStr = "Sabine (Savin Juniper)";break;
case 80:
this.dateStr = "Hoyau (Grub-hoe)";break;
case 81:
this.dateStr = "Érable à sucre (Sugar Maple)";break;
case 82:
this.dateStr = "Bruyère (Heather)";break;
case 83:
this.dateStr = "Roseau (Reed plant)";break;
case 84:
this.dateStr = "Oseille (Sorrel)";break;
case 85:
this.dateStr = "Grillon (Cricket)";break;
case 86:
this.dateStr = "Pignon (Pine nut)";break;
case 87:
this.dateStr = "Liège (Cork)";break;
case 88:
this.dateStr = "Truffe (Truffle)";break;
case 89:
this.dateStr = "Olive (Olive)";break;
case 90:
this.dateStr = "Pelle (Shovel)";break;
case 91:
this.dateStr = "Tourbe (Peat)";break;
case 92:
this.dateStr = "Houille (Coal)";break;
case 93:
this.dateStr = "Bitume (Bitumen)";break;
case 94:
this.dateStr = "Soufre (Sulphur)";break;
case 95:
this.dateStr = "Chien (Dog)";break;
case 96:
this.dateStr = "Lave (Lava)";break;
case 97:
this.dateStr = "Terre végétale (Topsoil)";break;
case 98:
this.dateStr = "Fumier (Manure)";break;
case 99:
this.dateStr = "Salpêtre (Saltpeter)";break;
case 100:
this.dateStr = "Fléau (Flail)";break;
case 101:
this.dateStr = "Granit (Granite)";break;
case 102:
this.dateStr = "Argile (Clay)";break;
case 103:
this.dateStr = "Ardoise (Slate)";break;
case 104:
this.dateStr = "Grès (Sandstone)";break;
case 105:
this.dateStr = "Lapin (Rabbit)";break;
case 106:
this.dateStr = "Silex (Flint)";break;
case 107:
this.dateStr = "Marne (Marl)";break;
case 108:
this.dateStr = "Pierre à chaux (Limestone)";break;
case 109:
this.dateStr = "Marbre (Marble)";break;
case 110:
this.dateStr = "Van (Winnowing basket)";break;
case 111:
this.dateStr = "Pierre à plâtre (Gypsum)";break;
case 112:
this.dateStr = "Sel (Salt)";break;
case 113:
this.dateStr = "Fer (Iron)";break;
case 114:
this.dateStr = "Cuivre (Copper)";break;
case 115:
this.dateStr = "Chat (Cat)";break;
case 116:
this.dateStr = "Étain (Tin)";break;
case 117:
this.dateStr = "Plomb (Lead)";break;
case 118:
this.dateStr = "Zinc (Zinc)";break;
case 119:
this.dateStr = "Mercure (Mercury)";break;
case 120:
this.dateStr = "Crible (Sieve)";break;
case 121:
this.dateStr = "Lauréole (Spurge-laurel)";break;
case 122:
this.dateStr = "Mousse (Moss)";break;
case 123:
this.dateStr = "Fragon (Butcher's Broom)";break;
case 124:
this.dateStr = "Perce-neige (Snowdrop)";break;
case 125:
this.dateStr = "Taureau (Bull)";break;
case 126:
this.dateStr = "Laurier-thym (Laurustinus)";break;
case 127:
this.dateStr = "Amadouvier (Tinder polypore)";break;
case 128:
this.dateStr = "Mézéréon (Daphne mezereum)";break;
case 129:
this.dateStr = "Peuplier (Poplar)";break;
case 130:
this.dateStr = "Coignée (Axe)";break;
case 131:
this.dateStr = "Ellébore (Hellebore)";break;
case 132:
this.dateStr = "Brocoli (Broccoli)";break;
case 133:
this.dateStr = "Laurier (Bay laurel)";break;
case 134:
this.dateStr = "Avelinier (Filbert)";break;
case 135:
this.dateStr = "Vache (Cow)";break;
case 136:
this.dateStr = "Buis (Box Tree)";break;
case 137:
this.dateStr = "Lichen (Lichen)";break;
case 138:
this.dateStr = "If (Yew tree)";break;
case 139:
this.dateStr = "Pulmonaire (Lungwort)";break;
case 140:
this.dateStr = "Serpette (Billhook)";break;
case 141:
this.dateStr = "Thlaspi (Pennycress)";break;
case 142:
this.dateStr = "Thimelé (Rose Daphne)";break;
case 143:
this.dateStr = "Chiendent (Couch grass)";break;
case 144:
this.dateStr = "Trainasse (Common Knotgrass)";break;
case 145:
this.dateStr = "Lièvre (Hare)";break;
case 146:
this.dateStr = "Guède (Woad)";break;
case 147:
this.dateStr = "Noisetier (Hazel)";break;
case 148:
this.dateStr = "Cyclamen (Cyclamen)";break;
case 149:
this.dateStr = "Chélidoine (Celandine)";break;
case 150:
this.dateStr = "Traîneau (Sleigh)";break;
case 151:
this.dateStr = "Tussilage (Coltsfoot)";break;
case 152:
this.dateStr = "Cornouiller (Dogwood)";break;
case 153:
this.dateStr = "Violier (Matthiola)";break;
case 154:
this.dateStr = "Troène (Privet)";break;
case 155:
this.dateStr = "Bouc (Billygoat)";break;
case 156:
this.dateStr = "Asaret (Wild Ginger)";break;
case 157:
this.dateStr = "Alaterne (Italian Buckthorn)";break;
case 158:
this.dateStr = "Violette (Violet)";break;
case 159:
this.dateStr = "Marceau (Goat Willow)";break;
case 160:
this.dateStr = "Bêche (Spade)";break;
case 161:
this.dateStr = "Narcisse (Narcissus)";break;
case 162:
this.dateStr = "Orme (Elm)";break;
case 163:
this.dateStr = "Fumeterre (Common fumitory)";break;
case 164:
this.dateStr = "Vélar (Hedge mustard)";break;
case 165:
this.dateStr = "Chèvre (Goat)";break;
case 166:
this.dateStr = "Épinard (Spinach)";break;
case 167:
this.dateStr = "Doronic (Doronicum)";break;
case 168:
this.dateStr = "Mouron (Pimpernel)";break;
case 169:
this.dateStr = "Cerfeuil (Chervil)";break;
case 170:
this.dateStr = "Cordeau (Twine)";break;
case 171:
this.dateStr = "Mandragore (Mandrake)";break;
case 172:
this.dateStr = "Persil (Parsley)";break;
case 173:
this.dateStr = "Cochléaria (Scurvy-grass)";break;
case 174:
this.dateStr = "Pâquerette (Daisy)";break;
case 175:
this.dateStr = "Thon (Tuna)";break;
case 176:
this.dateStr = "Pissenlit (Dandelion)";break;
case 177:
this.dateStr = "Sylvie (Wood Anemone)";break;
case 178:
this.dateStr = "Capillaire (Maidenhair fern)";break;
case 179:
this.dateStr = "Frêne (Ash tree)";break;
case 180:
this.dateStr = "Plantoir (Dibber)";break;
case 181:
this.dateStr = "Primevère (Primrose)";break;
case 182:
this.dateStr = "Platane (Plane Tree)";break;
case 183:
this.dateStr = "Asperge (Asparagus)";break;
case 184:
this.dateStr = "Tulipe (Tulip)";break;
case 185:
this.dateStr = "Poule (Hen)";break;
case 186:
this.dateStr = "Bette (Chard)";break;
case 187:
this.dateStr = "Bouleau (Birch)";break;
case 188:
this.dateStr = "Jonquille (Daffodil)";break;
case 189:
this.dateStr = "Aulne (Alder)";break;
case 190:
this.dateStr = "Couvoir (Hatchery)";break;
case 191:
this.dateStr = "Pervenche (Periwinkle)";break;
case 192:
this.dateStr = "Charme (Hornbeam)";break;
case 193:
this.dateStr = "Morille (Morel)";break;
case 194:
this.dateStr = "Hêtre (Beech Tree)";break;
case 195:
this.dateStr = "Abeille (Bee)";break;
case 196:
this.dateStr = "Laitue (Lettuce)";break;
case 197:
this.dateStr = "Mélèze (Larch)";break;
case 198:
this.dateStr = "Ciguë (Hemlock)";break;
case 199:
this.dateStr = "Radis (Radish)";break;
case 200:
this.dateStr = "Ruche (Hive)";break;
case 201:
this.dateStr = "Gainier (Judas tree)";break;
case 202:
this.dateStr = "Romaine (Romaine lettuce)";break;
case 203:
this.dateStr = "Marronnier (Horse chestnut)";break;
case 204:
this.dateStr = "Roquette (Arugula or Rocket)";break;
case 205:
this.dateStr = "Pigeon (Pigeon)";break;
case 206:
this.dateStr = "Lilas (Lilac)";break;
case 207:
this.dateStr = "Anémone (Anemone)";break;
case 208:
this.dateStr = "Pensée (Pansy)";break;
case 209:
this.dateStr = "Myrtille (Bilberry)";break;
case 210:
this.dateStr = "Greffoir (Knife)";break;
case 211:
this.dateStr = "Rose (Rose)";break;
case 212:
this.dateStr = "Chêne (Oak Tree)";break;
case 213:
this.dateStr = "Fougère (Fern)";break;
case 214:
this.dateStr = "Aubépine (Hawthorn)";break;
case 215:
this.dateStr = "Rossignol (Nightingale)";break;
case 216:
this.dateStr = "Ancolie (Common Columbine)";break;
case 217:
this.dateStr = "Muguet (Lily of the valley)";break;
case 218:
this.dateStr = "Champignon (Button mushroom)";break;
case 219:
this.dateStr = "Hyacinthe (Hyacinth)";break;
case 220:
this.dateStr = "Râteau (Rake)";break;
case 221:
this.dateStr = "Rhubarbe (Rhubarb)";break;
case 222:
this.dateStr = "Sainfoin (Sainfoin)";break;
case 223:
this.dateStr = "Bâton d'or (Wallflower)";break;
case 224:
this.dateStr = "Chamerisier (Fan Palm tree)";break;
case 225:
this.dateStr = "Ver à soie (Silkworm)";break;
case 226:
this.dateStr = "Consoude (Comfrey)";break;
case 227:
this.dateStr = "Pimprenelle (Salad burnet)";break;
case 228:
this.dateStr = "Corbeille d'or (Basket of Gold)";break;
case 229:
this.dateStr = "Arroche (Orache)";break;
case 230:
this.dateStr = "Sarcloir (Garden hoe)";break;
case 231:
this.dateStr = "Statice (Thrift)";break;
case 232:
this.dateStr = "Fritillaire (Fritillary)";break;
case 233:
this.dateStr = "Bourrache (Borage)";break;
case 234:
this.dateStr = "Valériane (Valerian)";break;
case 235:
this.dateStr = "Carpe (Carp)";break;
case 236:
this.dateStr = "Fusain (Spindle (shrub))";break;
case 237:
this.dateStr = "Civette (Chive)";break;
case 238:
this.dateStr = "Buglosse (Bugloss)";break;
case 239:
this.dateStr = "Sénevé (Wild mustard)";break;
case 240:
this.dateStr = "Houlette (Shepherd's crook)";break;
case 241:
this.dateStr = "Luzerne (Alfalfa)";break;
case 242:
this.dateStr = "Hémérocalle (Daylily)";break;
case 243:
this.dateStr = "Trèfle (Clover)";break;
case 244:
this.dateStr = "Angélique (Angelica)";break;
case 245:
this.dateStr = "Canard (Duck)";break;
case 246:
this.dateStr = "Mélisse (Lemon balm)";break;
case 247:
this.dateStr = "Fromental (Oat grass)";break;
case 248:
this.dateStr = "Martagon (Martagon lily)";break;
case 249:
this.dateStr = "Serpolet (Wild Thyme)";break;
case 250:
this.dateStr = "Faux (Scythe)";break;
case 251:
this.dateStr = "Fraise (Strawberry)";break;
case 252:
this.dateStr = "Bétoine (Woundwort)";break;
case 253:
this.dateStr = "Pois (Pea)";break;
case 254:
this.dateStr = "Acacia (Acacia)";break;
case 255:
this.dateStr = "Caille (Quail)";break;
case 256:
this.dateStr = "Œillet (Carnation)";break;
case 257:
this.dateStr = "Sureau (Elderberry)";break;
case 258:
this.dateStr = "Pavot (Poppy plant)";break;
case 259:
this.dateStr = "Tilleul (Linden or Lime tree)";break;
case 260:
this.dateStr = "Fourche (Pitchfork)";break;
case 261:
this.dateStr = "Barbeau (Cornflower)";break;
case 262:
this.dateStr = "Camomille (Camomile)";break;
case 263:
this.dateStr = "Chèvrefeuille (Honeysuckle)";break;
case 264:
this.dateStr = "Caille-lait (Bedstraw)";break;
case 265:
this.dateStr = "Tanche (Tench)";break;
case 266:
this.dateStr = "Jasmin (Jasmine)";break;
case 267:
this.dateStr = "Verveine (Verbena)";break;
case 268:
this.dateStr = "Thym (Thyme)";break;
case 269:
this.dateStr = "Pivoine (Peony)";break;
case 270:
this.dateStr = "Chariot (Hand Cart)";break;
case 271:
this.dateStr = "Seigle (Rye)";break;
case 272:
this.dateStr = "Avoine (Oat)";break;
case 273:
this.dateStr = "Oignon (Onion)";break;
case 274:
this.dateStr = "Véronique (Speedwell)";break;
case 275:
this.dateStr = "Mulet (Mule)";break;
case 276:
this.dateStr = "Romarin (Rosemary)";break;
case 277:
this.dateStr = "Concombre (Cucumber)";break;
case 278:
this.dateStr = "Échalote (Shallot)";break;
case 279:
this.dateStr = "Absinthe (Wormwood)";break;
case 280:
this.dateStr = "Faucille (Sickle)";break;
case 281:
this.dateStr = "Coriandre (Coriander)";break;
case 282:
this.dateStr = "Artichaut (Artichoke)";break;
case 283:
this.dateStr = "Girofle (Clove)";break;
case 284:
this.dateStr = "Lavande (Lavender)";break;
case 285:
this.dateStr = "Chamois (Chamois)";break;
case 286:
this.dateStr = "Tabac (Tobacco)";break;
case 287:
this.dateStr = "Groseille (Redcurrant)";break;
case 288:
this.dateStr = "Gesse (Hairy Vetchling)";break;
case 289:
this.dateStr = "Cerise (Cherry)";break;
case 290:
this.dateStr = "Parc (Park)";break;
case 291:
this.dateStr = "Menthe (Mint)";break;
case 292:
this.dateStr = "Cumin (Cumin)";break;
case 293:
this.dateStr = "Haricot (Bean)";break;
case 294:
this.dateStr = "Orcanète (Alkanet)";break;
case 295:
this.dateStr = "Pintade (Guinea fowl)";break;
case 296:
this.dateStr = "Sauge (Sage Plant)";break;
case 297:
this.dateStr = "Ail (Garlic)";break;
case 298:
this.dateStr = "Vesce (Tare)";break;
case 299:
this.dateStr = "Blé (Wheat)";break;
case 300:
this.dateStr = "Chalémie (Shawm)";break;
case 301:
this.dateStr = "Épeautre (Spelt)";break;
case 302:
this.dateStr = "Bouillon blanc (Common mullein)";break;
case 303:
this.dateStr = "Melon (Melon)";break;
case 304:
this.dateStr = "Ivraie (Ryegrass)";break;
case 305:
this.dateStr = "Bélier (Ram)";break;
case 306:
this.dateStr = "Prêle (Horsetail)";break;
case 307:
this.dateStr = "Armoise (Mugwort)";break;
case 308:
this.dateStr = "Carthame (Safflower)";break;
case 309:
this.dateStr = "Mûre (Blackberry)";break;
case 310:
this.dateStr = "Arrosoir (Watering can)";break;
case 311:
this.dateStr = "Panic (Switchgrass)";break;
case 312:
this.dateStr = "Salicorne (Common Glasswort)";break;
case 313:
this.dateStr = "Abricot (Apricot)";break;
case 314:
this.dateStr = "Basilic (Basil)";break;
case 315:
this.dateStr = "Brebis (Ewe)";break;
case 316:
this.dateStr = "Guimauve (Marshmallow)";break;
case 317:
this.dateStr = "Lin (Flax)";break;
case 318:
this.dateStr = "Amande (Almond)";break;
case 319:
this.dateStr = "Gentiane (Gentian)";break;
case 320:
this.dateStr = "Écluse (Lock)";break;
case 321:
this.dateStr = "Carline (Carline thistle)";break;
case 322:
this.dateStr = "Câprier (Caper)";break;
case 323:
this.dateStr = "Lentille (Lentil)";break;
case 324:
this.dateStr = "Aunée (Inula)";break;
case 325:
this.dateStr = "Loutre (Otter)";break;
case 326:
this.dateStr = "Myrte (Myrtle)";break;
case 327:
this.dateStr = "Colza (Rapeseed)";break;
case 328:
this.dateStr = "Lupin (Lupin)";break;
case 329:
this.dateStr = "Coton (Cotton)";break;
case 330:
this.dateStr = "Moulin (Mill)";break;
case 331:
this.dateStr = "Prune (Plum)";break;
case 332:
this.dateStr = "Millet (Millet)";break;
case 333:
this.dateStr = "Lycoperdon (Puffball)";break;
case 334:
this.dateStr = "Escourgeon (Six-row Barley)";break;
case 335:
this.dateStr = "Saumon (Salmon)";break;
case 336:
this.dateStr = "Tubéreuse (Tuberose)";break;
case 337:
this.dateStr = "Sucrion (Winter Barley)";break;
case 338:
this.dateStr = "Apocyn (Apocynum)";break;
case 339:
this.dateStr = "Réglisse (Liquorice)";break;
case 340:
this.dateStr = "Échelle (Ladder)";break;
case 341:
this.dateStr = "Pastèque (Watermelon)";break;
case 342:
this.dateStr = "Fenouil (Fennel)";break;
case 343:
this.dateStr = "Épine vinette (Barberry)";break;
case 344:
this.dateStr = "Noix (Walnut)";break;
case 345:
this.dateStr = "Truite (Trout)";break;
case 346:
this.dateStr = "Citron (Lemon)";break;
case 347:
this.dateStr = "Cardère (Teasel)";break;
case 348:
this.dateStr = "Nerprun (Buckthorn)";break;
case 349:
this.dateStr = "Tagette (Mexican Marigold)";break;
case 350:
this.dateStr = "Hotte (Harvesting basket)";break;
case 351:
this.dateStr = "Églantier (Wild Rose)";break;
case 352:
this.dateStr = "Noisette (Hazelnut)";break;
case 353:
this.dateStr = "Houblon (Hops)";break;
case 354:
this.dateStr = "Sorgho (Sorghum)";break;
case 355:
this.dateStr = "Écrevisse (Crayfish)";break;
case 356:
this.dateStr = "Bigarade (Bitter orange)";break;
case 357:
this.dateStr = "Verge d'or (Goldenrod)";break;
case 358:
this.dateStr = "Maïs (Maize or Corn)";break;
case 359:
this.dateStr = "Marron (Sweet Chestnut)";break;
case 360:
this.dateStr = "Panier (Pack Basket)";break;
case 361:
this.dateStr = "la Vertu (Virtue)";break;
case 362:
this.dateStr = "Génie (Talent)";break;
case 363:
this.dateStr = "Travail (Labour)";break;
case 364:
this.dateStr = "l'Opinion (Convictions)";break;
case 365:
this.dateStr = "Récompenses (Honors)";break;
case 366:
this.dateStr = "la Révolution (Revolution)";break;
}
this.weekday = "";
switch (this.date % 10) {
case 0:
this.weekday = "Décadi";break;
case 1:
this.weekday = "Primidi";break;
case 2:
this.weekday = "Duodi";break;
case 3:
this.weekday = "Tridi";break;
case 4:
this.weekday = "Quartidi";break;
case 5:
this.weekday = "Quintidi";break;
case 6:
this.weekday = "Sextidi";break;
case 7:
this.weekday = "Septidi";break;
case 8:
this.weekday = "Octidi";break;
case 9:
this.weekday = "Nonidi";break;
}
this.decade = Math.floor(this.yeardays / 10) + 1;
if (this.yeardays > 360) {
term = "celebration of " + this.dateStr;
} else {
this.dateStr = "day of " + this.dateStr;
}
this.toString = function () {
return this.date + " " + this.month + " " + this.years + ", " + this.weekday + ", décade " + this.decade + ", the " + this.dateStr;
};
};
@jamesgdahl
Copy link

I forgot to create an account for this so I couldn't update it here, so I forked to here
https://gist.github.com/jamesgdahl/1ef2a458fa6fb9d54b437f5d816792b2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment