This commit is contained in:
parent
c7a91c7da0
commit
1071eeffd0
@ -0,0 +1,21 @@
|
||||
name: "Publish"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Cloning repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Push to dokku
|
||||
uses: dokku/github-action@master
|
||||
with:
|
||||
git_remote_url: "ssh://dokku@10.0.3.39:22/ss-pp-to-rank-overlay"
|
||||
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
|
@ -4,9 +4,8 @@
|
||||
* @param timestamp the timestamp to format
|
||||
* @returns the day count
|
||||
*/
|
||||
export function getDaysSince(timestamp: number) {
|
||||
const now = new Date().getTime();
|
||||
const diff = now - timestamp;
|
||||
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
|
||||
return days;
|
||||
export function getDaysSince(timestamp: Date) {
|
||||
const now = new Date();
|
||||
const diff = now.getTime() - timestamp.getTime();
|
||||
return Math.floor(diff / (1000 * 60 * 60 * 24));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user