From 78deb73e0490d3b2fd3f8a2069ab8f4c68b9a765 Mon Sep 17 00:00:00 2001 From: Zeusking19 Date: Sat, 26 Dec 2015 15:20:31 +0000 Subject: [PATCH] Resolve #26 - Get dates to display properly in Pony.fm --- app/Album.php | 2 +- app/Playlist.php | 2 +- app/Track.php | 6 +- public/templates/albums/show.html | 2 +- public/templates/playlists/show.html | 2 +- public/templates/tracks/show.html | 2 +- .../assets/scripts/app/filters/pfm-date.js | 222 ------------------ 7 files changed, 8 insertions(+), 230 deletions(-) delete mode 100644 resources/assets/scripts/app/filters/pfm-date.js diff --git a/app/Album.php b/app/Album.php index abe43872..2bbb0f80 100644 --- a/app/Album.php +++ b/app/Album.php @@ -164,7 +164,7 @@ class Album extends Model 'track_count' => (int)$album->track_count, 'title' => $album->title, 'slug' => $album->slug, - 'created_at' => $album->created_at, + 'created_at' => $album->created_at->format('c'), 'stats' => [ 'views' => (int)$album->view_count, 'downloads' => (int)$album->download_count, diff --git a/app/Playlist.php b/app/Playlist.php index e9deaf61..6269b70b 100644 --- a/app/Playlist.php +++ b/app/Playlist.php @@ -121,7 +121,7 @@ class Playlist extends Model 'track_count' => $playlist->track_count, 'title' => $playlist->title, 'slug' => $playlist->slug, - 'created_at' => $playlist->created_at, + 'created_at' => $playlist->created_at->format('c'), 'is_public' => (bool)$playlist->is_public, 'stats' => [ 'views' => (int)$playlist->view_count, diff --git a/app/Track.php b/app/Track.php index d5b005b6..e57fe036 100644 --- a/app/Track.php +++ b/app/Track.php @@ -313,7 +313,7 @@ class Track extends Model 'is_explicit' => (bool)$track->is_explicit, 'is_downloadable' => (bool)$track->is_downloadable, 'is_published' => (bool)$track->isPublished(), - 'published_at' => $track->published_at, + 'published_at' => $track->published_at->format('c'), 'duration' => $track->duration, 'genre' => $track->genre != null ? @@ -374,8 +374,8 @@ class Track extends Model 'is_explicit' => $track->is_explicit, 'is_downloadable' => $track->is_downloadable, 'is_published' => $track->isPublished(), - 'created_at' => $track->created_at, - 'published_at' => $track->published_at, + 'created_at' => $track->created_at->format('c'), + 'published_at' => $track->published_at->format('c'), 'duration' => $track->duration, 'genre_id' => $track->genre_id, 'track_type_id' => $track->track_type_id, diff --git a/public/templates/albums/show.html b/public/templates/albums/show.html index 967ddf10..c911f852 100644 --- a/public/templates/albums/show.html +++ b/public/templates/albums/show.html @@ -42,7 +42,7 @@