diff options
author | Freya Murphy <freya@freyacat.org> | 2024-05-28 21:03:16 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-05-28 21:03:16 -0400 |
commit | 268dfc987664416db099761d51a5c007eb926904 (patch) | |
tree | 8272ea615092a412d9da567e70e9468027219c8c /src/web/_model | |
parent | e (diff) | |
download | xssbook2-268dfc987664416db099761d51a5c007eb926904.tar.gz xssbook2-268dfc987664416db099761d51a5c007eb926904.tar.bz2 xssbook2-268dfc987664416db099761d51a5c007eb926904.zip |
fix date
Diffstat (limited to 'src/web/_model')
-rw-r--r-- | src/web/_model/format.php | 10 | ||||
-rw-r--r-- | src/web/_model/main.php | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/web/_model/format.php b/src/web/_model/format.php index d2a3700..d2b7316 100644 --- a/src/web/_model/format.php +++ b/src/web/_model/format.php @@ -33,14 +33,4 @@ class Format_model extends Model { return $name; } - /** - * Formats a date - * @param string $date - the data in RFC3999 format - * @returns the formatted date - */ - public function date($date) { - $date=date_create($date); - return date_format($date, "Y-m-d H:i"); - } - } diff --git a/src/web/_model/main.php b/src/web/_model/main.php index 58ae307..cd34740 100644 --- a/src/web/_model/main.php +++ b/src/web/_model/main.php @@ -104,6 +104,16 @@ class Main_model { return NULL; } + /** + * Formats a date + * @param string $date - the data in RFC3999 format + * @returns the formatted date + */ + public function date($date) { + $date=date_create($date); + return date_format($date, "Y-m-d D H:m"); + } + } ?> |