Skip to content

Commit

Permalink
fix: use dateOnly from local extension
Browse files Browse the repository at this point in the history
  • Loading branch information
gbassisp committed Dec 17, 2024
1 parent d2816ea commit 3c87587
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/src/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:any_date/any_date.dart';
import 'package:meta/meta.dart';

/// a collection of extensions on [DateTime]
@internal
extension DateTimeExtension on DateTime {
/// returns a [DateTime] as UTC after applying the offset
DateTime copyWithOffset(String offset) {
Expand Down Expand Up @@ -111,6 +112,8 @@ extension DateTimeExtension on DateTime {
allowRollover: true,
);
}

DateTime get dateOnly => DateTime(year, month, day);
}

const _parser = AnyDate();
Expand Down
2 changes: 1 addition & 1 deletion test/failing_locales_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
// mn
// ja
import 'package:any_date/any_date.dart';
import 'package:any_date/src/extensions.dart';
import 'package:intl/intl.dart';
import 'package:lean_extensions/lean_extensions.dart';
import 'package:test/test.dart';

import 'test_values.dart';
Expand Down

0 comments on commit 3c87587

Please sign in to comment.