Menu

## Unit : string
in package

Unit.php : 16

### Table of Contents

#### Cases

Century = 'century'
Day = 'day'
Decade = 'decade'
Hour = 'hour'
Microsecond = 'microsecond'
Millennium = 'millennium'
Millisecond = 'millisecond'
Minute = 'minute'
Month = 'month'
Quarter = 'quarter'
Second = 'second'
Week = 'week'
Year = 'year'

#### Methods

fromName() : self
interval() : CarbonInterval
locale() : CarbonInterval
plural() : string
singular() : string
stepBy() : CarbonPeriod
toName() : string
toPeriod() : CarbonPeriod

### Cases

#### Microsecond

Unit.php : 18

#### Millisecond

Unit.php : 19

#### Second

Unit.php : 20

#### Minute

Unit.php : 21

#### Hour

Unit.php : 22

#### Day

Unit.php : 23

#### Week

Unit.php : 24

#### Month

Unit.php : 25

#### Quarter

Unit.php : 26

#### Year

Unit.php : 27

#### Decade

Unit.php : 28

#### Century

Unit.php : 29

#### Millennium

Unit.php : 30

### Methods

#### fromName()

Unit.php : 43
`public static fromName(string $name[, string|null $locale = null ]) : self`

##### Parameters

$name : string
$locale : string|null = null

##### Return values

self

#### interval()

Unit.php : 100
`public interval([int|float $value = 1 ]) : CarbonInterval`

##### Parameters

$value : int|float = 1

##### Return values

CarbonInterval

#### locale()

Unit.php : 105
`public locale(string $locale) : CarbonInterval`

##### Parameters

$locale : string

##### Return values

CarbonInterval

#### plural()

Unit.php : 88
`public plural([string|null $locale = null ]) : string`

##### Parameters

$locale : string|null = null

##### Return values

string

#### singular()

Unit.php : 76
`public singular([string|null $locale = null ]) : string`

##### Parameters

$locale : string|null = null

##### Return values

string

#### stepBy()

Unit.php : 115
`public stepBy(mixed $interval[, Unit|string|null $unit = null ]) : CarbonPeriod`

##### Parameters

$interval : mixed
$unit : Unit|string|null = null

##### Return values

CarbonPeriod

#### toName()

Unit.php : 32
`public static toName(self|string $unit) : string`

##### Parameters

$unit : self|string

##### Return values

string

#### toPeriod()

Unit.php : 110
`public toPeriod(mixed ...$params) : CarbonPeriod`

##### Parameters

$params : mixed

##### Return values

CarbonPeriod

## Search results