Skip to content

Commit

Permalink
Fixed DRY principle violation in DateTime.local() (#898)
Browse files Browse the repository at this point in the history
  • Loading branch information
raguljr committed May 8, 2021
1 parent 63b0ab8 commit 2d36a9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/datetime.js
Expand Up @@ -479,7 +479,7 @@ export default class DateTime {
*/
static local(year, month, day, hour, minute, second, millisecond) {
if (isUndefined(year)) {
return new DateTime({});
return DateTime.now();
} else {
return quickDT(
{
Expand Down

0 comments on commit 2d36a9c

Please sign in to comment.