---
title: "Discussion on \"Unit testing DateTime.now() with the help of Dart extensions\" | Hashnode"
description: "Discussion on \"Unit testing DateTime.now() with the help of Dart extensions\". The Problem…\nOften times within our applications, both on the UI and Data sides we will need to set “defaults” for dates, the simplest way to do that in most cases would be to use DateTime.now(), after all, we are most likely going to use the current..."
url: "https://hashnode.com/posts/unit-testing-datetimenow-with-the-help-of-dart-extensions/60f3f10966fcdb0a02743928"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Unit testing DateTime.now() with the help of Dart extensions](https://remelehane.dev/unit-testing-datetimenow-with-the-help-of-dart-extensions?utm_source=hashnode&utm_medium=feed)

The Problem… Often times within our applications, both on the UI and Data sides we will need to set “defaults” for dates, the simplest way to do that in most cases would be to use DateTime.now(), after all, we are most likely going to use the current...

Jul 16, 2021 · 3 min read · remelehane.dev  
Read the article

-   [#flutter](https://hashnode.com/tag/flutter)
-   [#unit-testing](https://hashnode.com/tag/unit-testing)
-   [#testing](https://hashnode.com/tag/testing)
-   [#flutter-examples](https://hashnode.com/tag/flutter-examples)
-   [#flutter-widgets](https://hashnode.com/tag/flutter-widgets)

## Written by

[Reme Le Hane](https://hashnode.com/@remelehane)

@remelehane · South Africa

  
[View profile](https://hashnode.com/@remelehane)

Flutter Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
