Initial commit

master
Felix Stupp 5 years ago
commit ff656150a2
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

122
.gitignore vendored

@ -0,0 +1,122 @@
# Created by https://www.gitignore.io/api/code,node,vim
# Edit at https://www.gitignore.io/?templates=code,node,vim
### Code ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
### Vim ###
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Session
Session.vim
Sessionx.vim
# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
# End of https://www.gitignore.io/api/code,node,vim

@ -0,0 +1,15 @@
#!/usr/bin/node
if (!process.argv[2]) {
console.error("Missing argument: yyyy-mm-dd");
process.exit(1);
}
const moment = require("moment");
const birthday = moment(process.argv[2]);
let now = moment();
for (let m = moment(birthday); m.isSameOrBefore(now); m.add(1, 'y')) {
const diff = m.diff(birthday, 'years');
console.log(m.format("ddd") + ", " + m.year() + ", " + diff + " " + (diff === 1 ? "year" : "years") + " old");
}

13
package-lock.json generated

@ -0,0 +1,13 @@
{
"name": "crowl-birthdays",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"moment": {
"version": "2.24.0",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz",
"integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg=="
}
}
}

@ -0,0 +1,18 @@
{
"name": "crowl-birthdays",
"version": "1.0.0",
"description": "\"Crowl\" your birthdays, see on which weekdays you had a chance to party with your friends.",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://git.banananet.work/zocker/crowl-birthdays.git"
},
"author": "Felix Stupp",
"license": "MIT",
"dependencies": {
"moment": "^2.24.0"
}
}
Loading…
Cancel
Save