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
|
* @param timestamp the timestamp to format
|
||||||
* @returns the day count
|
* @returns the day count
|
||||||
*/
|
*/
|
||||||
export function getDaysSince(timestamp: number) {
|
export function getDaysSince(timestamp: Date) {
|
||||||
const now = new Date().getTime();
|
const now = new Date();
|
||||||
const diff = now - timestamp;
|
const diff = now.getTime() - timestamp.getTime();
|
||||||
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
|
return Math.floor(diff / (1000 * 60 * 60 * 24));
|
||||||
return days;
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user