-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement- Show upcoming Events * Implement- Show upcoming Events * Add unit test for celebrations bloc
- Loading branch information
1 parent
104e0da
commit d95e014
Showing
25 changed files
with
990 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:intl/intl.dart'; | ||
import 'package:projectunity/data/core/extensions/context_extension.dart'; | ||
|
||
extension DateExtension on DateTime { | ||
String toDate() { | ||
String toDateWithYear() { | ||
return DateFormat("dd MMMM, yyyy").format(this); | ||
} | ||
|
||
String toMonthYear() { | ||
return DateFormat("MMMM, yyyy").format(this); | ||
} | ||
|
||
String toDateWithoutYear(BuildContext context) { | ||
final today = DateUtils.dateOnly(DateTime.now()); | ||
if (isAtSameMomentAs(today)) { | ||
return context.l10n.dateFormatter_today; | ||
} | ||
return DateFormat("MMMM d, EEE").format(this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.