-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add half property and isFirstHalfOfYear, IsSecondHalfOfYear helpers
* Add half property and isFirstHalfOfYear, IsSecondHalfOfYear helpers --------- Co-authored-by: breno <breno.jesus@ufms.br>
- Loading branch information
1 parent
e9d8aaa
commit 7ca7713
Showing
11 changed files
with
163 additions
and
21 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
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 |
---|---|---|
|
@@ -276,6 +276,7 @@ Chronos は、出力した日時オブジェクトを表示するための多く | |
- daysInMonth | ||
- timestamp | ||
- quarter | ||
- half | ||
|
||
テストの支援 | ||
------------ | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Cake\Chronos\Test\TestCase\Date; | ||
|
||
use Cake\Chronos\ChronosDate; | ||
use Cake\Chronos\Test\TestCase\TestCase; | ||
use PHPUnit\Framework\Attributes\TestWith; | ||
|
||
class GettersTest extends TestCase | ||
{ | ||
#[TestWith([1, 1])] | ||
#[TestWith([2, 1])] | ||
#[TestWith([3, 1])] | ||
#[TestWith([4, 1])] | ||
#[TestWith([5, 1])] | ||
#[TestWith([6, 1])] | ||
#[TestWith([7, 2])] | ||
#[TestWith([8, 2])] | ||
#[TestWith([9, 2])] | ||
#[TestWith([10, 2])] | ||
#[TestWith([11, 2])] | ||
#[TestWith([12, 2])] | ||
public function testHalfOfYear(int $month, int $expectedHalfOfYear): void | ||
{ | ||
$d = ChronosDate::create(year: 2012, month: $month, day: 1); | ||
$this->assertSame($expectedHalfOfYear, $d->half); | ||
} | ||
} |
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
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