ejs stuff

This commit is contained in:
2025-07-22 00:17:00 +01:00
parent 7eeafddae4
commit cc131798a3
23 changed files with 311 additions and 89 deletions

10
functions.js Normal file
View File

@@ -0,0 +1,10 @@
// The configuration defines a date format using the date-fns (a datetime library) syntax
// eg "yyyy-MM-dd"
// this converts unix time (an integer) into a string that is formatted according to config.js
// uses date-fns's fromUnixTime() and format() functions
// returns the formatted date (string)
export function unix_time_to_date_format(unix_time, format) {
date = fromUnixTime(unix_time)
formatted_date = format(date, format)
return formatted_date
}