Skip to content

Commit

Permalink
Change timestamp method to get day of the month #2
Browse files Browse the repository at this point in the history
Changed the timestamp method in the note service to get the day of the month instead of the day of the year
  • Loading branch information
Jack Perala committed Mar 31, 2020
1 parent d7b4428 commit e4d525d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/app/notes/note.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class NoteService {
// Create a date object with the current time
const now: Date = new Date();
// Create an array with the current month, day and time
const date: Array<string> = [ String(now.getMonth() + 1), String(now.getDay()), String(now.getFullYear()) ];
const date: Array<string> = [ String(now.getMonth() + 1), String(now.getDate()), String(now.getFullYear()) ];
// Create an array with the current hour, minute and second
const time: Array<string> = [ String(now.getHours()), String(now.getMinutes()), String(now.getSeconds())];
// Return the formatted string
Expand Down

0 comments on commit e4d525d

Please sign in to comment.