Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rwu823 committed Jan 4, 2018
2 parents 1af0468 + 190fe48 commit ce3a2fc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ after_success:

branches:
except:
- /^?\d+\.\d+\.\d+/
- latest
- /^(latest)$/
10 changes: 8 additions & 2 deletions scripts/deploy.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ const { exec } = require('child_process');

const { version, repository } = require('../package.json');

const sh = (tstring) => {
exec(...tstring, (err, stdout, stderr) => {
const sh = (tstrings, ...vars) => {
const fork = Array.from(tstrings);

vars.forEach((v, i) => {
fork[i] += v;
});

exec(fork.join(''), (err, stdout, stderr) => {
if (err) {
throw new Error(err);
}
Expand Down
15 changes: 6 additions & 9 deletions src/libs/isToday.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import suffix00 from '../utils/suffix00';
import qsParser from '../utils/qsParser';
import { now } from './now';

const isToday = (sec = 0) => {
const msec = sec * 1000;
const qs = qsParser();
const dadNow = qs['--dad.now'] || qs['dad.now'];
const ms = sec * 1000;
const dadNow = now();

const currentTime = dadNow
? new Date(suffix00(dadNow))
: new Date();
return new Date(msec).toDateString() === currentTime.toDateString();
const currentDate = new Date(dadNow * 1000);

return new Date(ms).toDateString() === currentDate.toDateString();
};

export {
Expand Down

0 comments on commit ce3a2fc

Please sign in to comment.