mirror of
https://gitlab.com/foxixus/neomovies-api.git
synced 2025-10-27 17:38:51 +05:00
Update 10 files
- /package.json - /package-lock.json - /README.md - /vercel.json - /src/config/tmdb.js - /src/public/api-docs/index.html - /src/utils/date.js - /src/utils/health.js - /src/routes/movies.js - /src/index.js
This commit is contained in:
13
src/utils/date.js
Normal file
13
src/utils/date.js
Normal file
@@ -0,0 +1,13 @@
|
||||
function formatDate(dateString) {
|
||||
if (!dateString) return null;
|
||||
const date = new Date(dateString);
|
||||
return date.toLocaleDateString('ru-RU', {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric'
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
formatDate
|
||||
};
|
||||
Reference in New Issue
Block a user