Skip to content

Commit

Permalink
Use getDate instead of getDay (#8)
Browse files Browse the repository at this point in the history
Date.prototype.getDay returns the day of the week whereas
Date.prototype.getDate returns the day of the month.
  • Loading branch information
jordanbtucker authored and kay-is committed Mar 30, 2018
1 parent 948c524 commit d650ff4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 07-property-example.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// it formats a date and returns a <span> containing that formatted string
function DateSpan(props) {
var date = props.date,
day = date.getDay(),
day = date.getDate(),
month = date.getMonth() + 1,
year = date.getFullYear()

Expand Down

0 comments on commit d650ff4

Please sign in to comment.