mirror of
https://gitlab.com/foxixus/neomovies-api.git
synced 2025-10-28 01:48:51 +05:00
- /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
14 lines
272 B
JavaScript
14 lines
272 B
JavaScript
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
|
|
};
|