PHPackages                             nathanmac/datetime-codeception-module - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. nathanmac/datetime-codeception-module

ActiveLibrary[Testing &amp; Quality](/categories/testing)

nathanmac/datetime-codeception-module
=====================================

Testing helpers for date/time comparisons in your Codeception acceptance tests.

v1.2(11y ago)2115.9k↓17.9%3MITPHP

Since Oct 28Pushed 11y ago1 watchersCompare

[ Source](https://github.com/nathanmac/datetime-codeception-module)[ Packagist](https://packagist.org/packages/nathanmac/datetime-codeception-module)[ RSS](/packages/nathanmac-datetime-codeception-module/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (3)

Codeception Date/Time Helpers Module
====================================

[](#codeception-datetime-helpers-module)

[![Build Status](https://camo.githubusercontent.com/08c98a8c52ef1582447f42f4f3e7d1109dcfd876e7030a2c3d6a09c9c5e768f2/68747470733a2f2f7472617669732d63692e6f72672f6e617468616e6d61632f6461746574696d652d636f646563657074696f6e2d6d6f64756c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/nathanmac/datetime-codeception-module)

Testing helpers for date/time comparisons in your Codeception acceptance tests.

Installation
------------

[](#installation)

Begin by installing this package through Composer. Edit your project's `composer.json` file to require `nathanmac/datetime-codeception-module`.

```
{
    "require-dev": {
        "codeception/codeception": "*",
        "nathanmac/datetime-codeception-module": "~1.0"
    }
}

```

Next, update Composer from the Terminal:

```
composer update

```

Then enable it in your suite configuration with the following settings

Examples
--------

[](#examples)

### Example Configuration

[](#example-configuration)

```
 modules:
   enabled: [Date, Time]

```

Actions
-------

[](#actions)

- [Date Module](#date-module)
- [Time Module](#time-module)

### Date Module

[](#date-module)

##### seeDateIsToday( string $date )

[](#seedateistoday-string-date-)

See date is today's date.

##### dontSeeDateIsToday( string $date )

[](#dontseedateistoday-string-date-)

See date is not today's date.

##### seeDateIsTomorrow( string $date )

[](#seedateistomorrow-string-date-)

See date is tomorrows date.

##### dontSeeDateIsTomorrow( string $date )

[](#dontseedateistomorrow-string-date-)

See date is not tomorrows date.

##### seeDateWasYesterday( string $date )

[](#seedatewasyesterday-string-date-)

See date was yesterdays date.

##### dontSeeDateWasYesterday( string $date )

[](#dontseedatewasyesterday-string-date-)

See date was not yesterdays date.

##### seeDateIsInDays( string $date, integer $days )

[](#seedateisindays-string-date-integer-days-)

See date is in a given number of days.

##### dontSeeDateIsInDays( string $date, integer $days )

[](#dontseedateisindays-string-date-integer-days-)

See date is not in a given number of days.

##### seeDateWasInDays( string $date, integer $days )

[](#seedatewasindays-string-date-integer-days-)

See date was in a given number of days.

##### dontSeeDateWasInDays( string $date, integer $days )

[](#dontseedatewasindays-string-date-integer-days-)

See date was in a given number of days.

##### seeDateIsNextWeek( string $date )

[](#seedateisnextweek-string-date-)

See date is next week.

##### dontSeeDateIsNextWeek( string $date )

[](#dontseedateisnextweek-string-date-)

See date is not next week.

##### seeDateIsInWeeks( string $date, integer $weeks )

[](#seedateisinweeks-string-date-integer-weeks-)

See date is in a given number of weeks.

##### dontSeeDateIsInWeeks( string $date, integer $weeks )

[](#dontseedateisinweeks-string-date-integer-weeks-)

See date is in a given number of weeks.

##### seeDateWasLastWeek( string $date )

[](#seedatewaslastweek-string-date-)

See date was last week.

##### dontSeeDateWasLastWeek( string $date )

[](#dontseedatewaslastweek-string-date-)

See date was not last week.

##### seeDateWasInWeeks( string $date, integer $weeks )

[](#seedatewasinweeks-string-date-integer-weeks-)

See date was in a given number of weeks.

##### dontSeeDateWasInWeeks( string $date, integer $weeks )

[](#dontseedatewasinweeks-string-date-integer-weeks-)

See date was in a given number of weeks.

##### seeDateIsNextMonth( string $date )

[](#seedateisnextmonth-string-date-)

See date is next month.

##### dontSeeDateIsNextMonth( string $date )

[](#dontseedateisnextmonth-string-date-)

See date is not next month.

##### seeDateIsInMonths( string $date, integer $months )

[](#seedateisinmonths-string-date-integer-months-)

See date is in a given number of months.

##### dontSeeDateIsInMonths( string $date, integer $months )

[](#dontseedateisinmonths-string-date-integer-months-)

See date is not in a given number of months.

##### seeDateWasLastMonth( string $date )

[](#seedatewaslastmonth-string-date-)

See date was last month.

##### dontSeeDateWasLastMonth( string $date )

[](#dontseedatewaslastmonth-string-date-)

See date was not last month.

##### seeDateWasInMonths( string $date, integer $months )

[](#seedatewasinmonths-string-date-integer-months-)

See date was in a given number of months.

##### dontSeeDateWasInMonths( string $date, integer $months )

[](#dontseedatewasinmonths-string-date-integer-months-)

See date was not in a given number of years.

##### seeDateIsNextYear( string $date )

[](#seedateisnextyear-string-date-)

See date is next year.

##### dontSeeDateIsNextYear( string $date )

[](#dontseedateisnextyear-string-date-)

See date is not next year.

##### seeDateIsInYears( string $date, integer $years )

[](#seedateisinyears-string-date-integer-years-)

See date is in a given number of years.

##### dontSeeDateIsInYears( string $date, integer $years )

[](#dontseedateisinyears-string-date-integer-years-)

See date is in not a given number of years.

##### seeDateWasLastYear( string $date )

[](#seedatewaslastyear-string-date-)

See date was last year.

##### dontSeeDateWasLastYear( string $date )

[](#dontseedatewaslastyear-string-date-)

See date was not last year.

##### seeDateWasInYears( string $date, integer $years )

[](#seedatewasinyears-string-date-integer-years-)

See date was in a given number of years.

##### dontSeeDateWasInYears( string $date, integer $years )

[](#dontseedatewasinyears-string-date-integer-years-)

See date was not in a given number of years.

##### seeDateIsMonday( string $date )

[](#seedateismonday-string-date-)

See date is a Monday.

##### dontSeeDateIsMonday( string $date )

[](#dontseedateismonday-string-date-)

See date is not a Monday.

##### seeDateIsTuesday( string $date )

[](#seedateistuesday-string-date-)

See date is a Tuesday.

##### dontSeeDateIsTuesday( string $date )

[](#dontseedateistuesday-string-date-)

See date is not a Tuesday.

##### seeDateIsWednesday( string $date )

[](#seedateiswednesday-string-date-)

See date is a Wednesday.

##### dontSeeDateIsWednesday( string $date )

[](#dontseedateiswednesday-string-date-)

See date is not a Wednesday.

##### seeDateIsThursday( string $date )

[](#seedateisthursday-string-date-)

See date is a Thursday.

##### dontSeeDateIsThursday( string $date )

[](#dontseedateisthursday-string-date-)

See date is not a Thursday.

##### seeDateIsFriday( string $date )

[](#seedateisfriday-string-date-)

See date is a Friday

##### dontSeeDateIsFriday( string $date )

[](#dontseedateisfriday-string-date-)

See date is not a Friday.

##### seeDateIsSaturday( string $date )

[](#seedateissaturday-string-date-)

See date is a Saturday.

##### dontSeeDateIsSaturday( string $date )

[](#dontseedateissaturday-string-date-)

See date is not a Saturday.

##### seeDateIsSunday( string $date )

[](#seedateissunday-string-date-)

See date is a Sunday.

##### dontSeeDateIsSunday( string $date )

[](#dontseedateissunday-string-date-)

See date is not a Sunday.

##### seeDateIsWeekday( string $date )

[](#seedateisweekday-string-date-)

See date is a weekday.

##### dontSeeDateIsWeekday( string $date )

[](#dontseedateisweekday-string-date-)

See date is not a weekday.

##### seeDateIsWeekend( string $date )

[](#seedateisweekend-string-date-)

See date is a weekend.

##### dontSeeDateIsWeekend( string $date )

[](#dontseedateisweekend-string-date-)

See date is not a weekend.

##### seeDateMatches( string $d1, string $d2 )

[](#seedatematches-string-d1-string-d2-)

See that two dates match.

##### dontSeeDateMatches( string $d1, string $d2 )

[](#dontseedatematches-string-d1-string-d2-)

See that two dates don't match.

##### seeDateInFuture( string $date )

[](#seedateinfuture-string-date-)

See the date is in the future.

##### dontSeeDateInFuture( string $date )

[](#dontseedateinfuture-string-date-)

See the date is not in the future.

##### seeDateInPast( string $date )

[](#seedateinpast-string-date-)

See the date is in the past.

##### dontSeeDateInPast( string $date )

[](#dontseedateinpast-string-date-)

See the date is not in the past.

##### seeDateInFirstQuarter( string $date )

[](#seedateinfirstquarter-string-date-)

See the date is within the first quarter of the year.

##### dontSeeDateInFirstQuarter( string $date )

[](#dontseedateinfirstquarter-string-date-)

See the date is not within the first quarter of the year.

##### seeDateInSecondQuarter( string $date )

[](#seedateinsecondquarter-string-date-)

See the date is within the second quarter of the year.

##### donSeeDateInSecondQuarter( string $date )

[](#donseedateinsecondquarter-string-date-)

See the date is not within the second quarter of the year.

##### seeDateInThirdQuarter( string $date )

[](#seedateinthirdquarter-string-date-)

See the date is within the third quarter of the year.

##### dontSeeDateInThirdQuarter( string $date )

[](#dontseedateinthirdquarter-string-date-)

See the date is not within the third quarter of the year.

##### seeDateInFourthQuarter( string $date )

[](#seedateinfourthquarter-string-date-)

See the date is within the forth quarter of the year.

##### dontSeeDateInFourthQuarter( string $date )

[](#dontseedateinfourthquarter-string-date-)

See the date is not within the forth quarter of the year.

##### seeDateInQuarter( string $date, integer $quarter )

[](#seedateinquarter-string-date-integer-quarter-)

See the date is within a particular quarter of the year.

##### dontSeeDateInQuarter( string $date, integer $quarter )

[](#dontseedateinquarter-string-date-integer-quarter-)

See the date is not within a particular quarter of the year.

##### seeDateIsLeapYear( string $date )

[](#seedateisleapyear-string-date-)

See the date is a leap year.

##### dontSeeDateIsLeapYear( string $date )

[](#dontseedateisleapyear-string-date-)

See the date is not a leap year.

##### seeDayInWeek( string $date, integer $day )

[](#seedayinweek-string-date-integer-day-)

See the date is a given day in the week.

##### dontSeeDayInWeek( string $date, integer $day )

[](#dontseedayinweek-string-date-integer-day-)

See the date is not a given day in the week.

##### seeDayInMonth( string $date, integer $day )

[](#seedayinmonth-string-date-integer-day-)

See the date is a given day in the month.

##### dontSeeDayInMonth( string $date, integer $day )

[](#dontseedayinmonth-string-date-integer-day-)

See the date is not a given day in the month.

##### seeDayInYear( string $date, integer $day )

[](#seedayinyear-string-date-integer-day-)

See the date is a given day in the year.

##### dontSeeDayInYear( string $date, integer $day )

[](#dontseedayinyear-string-date-integer-day-)

See the date is not a given day in the year.

##### seeWeekInMonth( string $date, integer $week )

[](#seeweekinmonth-string-date-integer-week-)

See the date is a not given week in the month.

##### dontSeeWeekInMonth( string $date, integer $week )

[](#dontseeweekinmonth-string-date-integer-week-)

See the date is a not given week in the month.

##### seeWeekInYear( string $date, integer $week )

[](#seeweekinyear-string-date-integer-week-)

See the date is a given week in the year.

##### dontSeeWeekInYear( string $date, integer $week )

[](#dontseeweekinyear-string-date-integer-week-)

See the date is not a given week in the year.

##### seeMonthInYear( string $date, integer $month )

[](#seemonthinyear-string-date-integer-month-)

See the month in the year is a given value.

##### dontSeeMonthInYear( string $date, integer $month )

[](#dontseemonthinyear-string-date-integer-month-)

See the month in the year is not a given value.

### Time Module

[](#time-module)

##### seeTimeIsInSecs( string $time, integer $seconds )

[](#seetimeisinsecs-string-time-integer-seconds-)

See time is in a given number of seconds.

##### dontSeeTimeIsInSecs( string $time, integer $seconds )

[](#dontseetimeisinsecs-string-time-integer-seconds-)

See time is not in a given number of seconds.

##### seeTimeWasInSecs( string $time, integer $seconds )

[](#seetimewasinsecs-string-time-integer-seconds-)

See time was in a given number of seconds.

##### dontSeeTimeWasInSecs( string $time, integer $seconds )

[](#dontseetimewasinsecs-string-time-integer-seconds-)

See time was not in a given number of seconds.

##### seeTimeIsInMins( string $time, integer $minutes )

[](#seetimeisinmins-string-time-integer-minutes-)

See time is in a given number of minutes.

##### dontSeeTimeIsInMins( string $time, integer $minutes )

[](#dontseetimeisinmins-string-time-integer-minutes-)

See time is not in a given number of minutes.

##### seeTimeWasInMins( string $time, integer $minutes )

[](#seetimewasinmins-string-time-integer-minutes-)

See time was in a given number of minutes.

##### dontSeeTimeWasInMins( string $time, integer $minutes )

[](#dontseetimewasinmins-string-time-integer-minutes-)

See time was not in a given number of minutes.

##### seeTimeIsInHours( string $time, integer $hours )

[](#seetimeisinhours-string-time-integer-hours-)

See time is in a given number of hours.

##### dontSeeTimeIsInHours( string $time, integer $hours )

[](#dontseetimeisinhours-string-time-integer-hours-)

See time is not in a given number of hours.

##### seeTimeWasInHours( string $time, integer $hours )

[](#seetimewasinhours-string-time-integer-hours-)

See time was in a given number of hours.

##### dontSeeTimeWasInHours( string $time, integer $hours )

[](#dontseetimewasinhours-string-time-integer-hours-)

See time was not in a given number of hours.

##### seeTimeInFuture( string $time )

[](#seetimeinfuture-string-time-)

See the time is in the future.

##### dontSeeTimeInFuture( string $time )

[](#dontseetimeinfuture-string-time-)

See the time is not in the future.

##### seeTimeInPast( string $time )

[](#seetimeinpast-string-time-)

See the time is in the past.

##### dontSeeTimeInPast( string $time )

[](#dontseetimeinpast-string-time-)

See the time is not in the past.

##### seeTimeMatches( string $t1, string $t2 )

[](#seetimematches-string-t1-string-t2-)

See that two times match.

##### dontSeeTimeMatches( string $t1, string $t2 )

[](#dontseetimematches-string-t1-string-t2-)

See that two times don't match.

License
=======

[](#license)

Released under the same license as Codeception: MIT

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

4219d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e938d7304b579f1f6ba7895dcee6b7b95eeb7f7aed77be6e4bcce777eb9e0245?d=identicon)[nathanmac](/maintainers/nathanmac)

---

Top Contributors

[![nathanmac](https://avatars.githubusercontent.com/u/3205902?v=4)](https://github.com/nathanmac "nathanmac (8 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/nathanmac-datetime-codeception-module/health.svg)

```
[![Health](https://phpackages.com/badges/nathanmac-datetime-codeception-module/health.svg)](https://phpackages.com/packages/nathanmac-datetime-codeception-module)
```

###  Alternatives

[spatie/test-time

A small package to control the flow time

2084.7M119](/packages/spatie-test-time)[spatie/pest-plugin-test-time

A Pest plugin to control the flow of time

491.5M94](/packages/spatie-pest-plugin-test-time)[grazulex/laravel-devtoolbox

Swiss-army artisan CLI for Laravel — Scan, inspect, debug, and explore every aspect of your Laravel application from the command line.

1535.4k](/packages/grazulex-laravel-devtoolbox)[anlutro/l4-testing

Base PHPUnit classes for Laravel 4.

133.7k3](/packages/anlutro-l4-testing)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
