mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-04 05:39:57 -05:00
Info JSON epoch is time of download, not time of upload.
This commit is contained in:
parent
ad405d30cd
commit
9ffe6ee3f6
7 changed files with 16 additions and 69 deletions
|
|
@ -106,14 +106,14 @@ export function Duration({video}) {
|
|||
}
|
||||
}
|
||||
|
||||
export function uploadDate(d) {
|
||||
export function epochToDateString(date) {
|
||||
// Convert a date integer to a human-readable date format.
|
||||
let upload_date = <></>;
|
||||
if (d) {
|
||||
upload_date = new Date(d * 1000);
|
||||
upload_date = `${upload_date.getFullYear()}-${upload_date.getMonth() + 1}-${upload_date.getDate()}`;
|
||||
let d = <></>;
|
||||
if (date) {
|
||||
d = new Date(date * 1000);
|
||||
d = `${d.getFullYear()}-${d.getMonth() + 1}-${d.getDate()}`;
|
||||
}
|
||||
return upload_date;
|
||||
return d;
|
||||
}
|
||||
|
||||
export function CardLink({to, newTab = false, ...props}) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue