@@ -26,7 +26,7 @@ import DayJS from 'react-dayjs';
26
26
27
27
export default class MyComponent extends React .Component {
28
28
render () {
29
- const date = " 2000-01-31T12 :59-0500 " ;
29
+ const date = " 2000-01-31T11 :59:00-05:00 " ;
30
30
return (
31
31
< DayJS> { date }< / DayJS>
32
32
);
@@ -50,7 +50,7 @@ _date = { string | number | Date | dayjs object }_
50
50
The date to be displayed, if not given as children. The default is the current time.
51
51
52
52
``` jsx
53
- < DayJS date= { " 2000-01-31T12 :59-0500 " }> 2000 - 01 - 31T12 : 59 - 0500 < / DayJS >
53
+ < DayJS date= { " 2000-01-31T11 :59:00-05:00 " }/ >
54
54
```
55
55
56
56
This will output:
@@ -68,7 +68,7 @@ The format the date should be displayed in. The default is `ISO 8601`, with no f
68
68
The available formats can be found on the [ dayjs] [ dayjs ] README.
69
69
70
70
``` jsx
71
- < DayJS format= " MM-DD-YYYY" > 2000 - 01 - 31T12 : 59 - 0500 < / DayJS>
71
+ < DayJS format= " MM-DD-YYYY" > 2000 - 01 - 31T11 : 59 : 00 - 05 : 00 < / DayJS>
72
72
```
73
73
74
74
This will output:
@@ -84,7 +84,7 @@ _element = { string | React.Component }_
84
84
The element the component should be rendered as. The default is ` time ` .
85
85
86
86
``` jsx
87
- < DayJS element= " span" > 2000 - 01 - 31T12 : 59 - 0500 < / DayJS>
87
+ < DayJS element= " span" > 2000 - 01 - 31T11 : 59 : 00 - 05 : 00 < / DayJS>
88
88
```
89
89
90
90
This will output:
@@ -99,7 +99,7 @@ _add = { object }_
99
99
Adds a specific amount of time to the given date.
100
100
101
101
``` jsx
102
- < DayJS add= { { hours: 1 } }> 2000 - 01 - 31T12 : 59 - 0500 < / DayJS>
102
+ < DayJS add= { { hours: 1 } }> 2000 - 01 - 31T11 : 59 : 00 - 05 : 00 < / DayJS>
103
103
```
104
104
105
105
This will output:
@@ -114,7 +114,7 @@ _subtract = { object }_
114
114
Subtracts a specific amount of time to the given date.
115
115
116
116
``` jsx
117
- < DayJS subtract= { { hours: 1 } }> 2000 - 01 - 31T12 : 59 - 0500 < / DayJS>
117
+ < DayJS subtract= { { hours: 1 } }> 2000 - 01 - 31T11 : 59 : 00 - 05 : 00 < / DayJS>
118
118
```
119
119
120
120
This will output:
@@ -129,7 +129,7 @@ _toJSON = { boolean }_
129
129
Serializes a dayjs object to JSON, which returns an ISO8601 string.
130
130
131
131
``` jsx
132
- < DayJS toJSON= { true }> 2000 - 01 - 31T12 : 59 - 0500 < / DayJS>
132
+ < DayJS toJSON= { true }> 2000 - 01 - 31T11 : 59 : 00 - 05 : 00 < / DayJS>
133
133
```
134
134
135
135
This will output:
@@ -144,7 +144,7 @@ _toISOString = { boolean }_
144
144
Formats a date to an ISO8601 string.
145
145
146
146
``` jsx
147
- < DayJS toISOString= { true }> 2000 - 01 - 31T12 : 59 - 0500 < / DayJS>
147
+ < DayJS toISOString= { true }> 2000 - 01 - 31T11 : 59 : 00 - 05 : 00 < / DayJS>
148
148
```
149
149
150
150
This will output:
@@ -159,7 +159,7 @@ _asString = { boolean }_
159
159
Formats a date as a more readable string, using the ` toString ` dayjs function.
160
160
161
161
``` jsx
162
- < DayJS asString= { true }> 2000 - 01 - 31T12 : 59 - 0500 < / DayJS>
162
+ < DayJS asString= { true }> 2000 - 01 - 31T11 : 59 : 00 - 05 : 00 < / DayJS>
163
163
```
164
164
165
165
This will output:
@@ -174,13 +174,13 @@ _unixSeconds = { boolean }_
174
174
Displays the time as a unix timestamp (the number of seconds since Unix Epoch).
175
175
176
176
``` jsx
177
- < DayJS unixSeconds= { true }> 2000 - 01 - 31T12 : 59 - 0500 < / DayJS>
177
+ < DayJS unixSeconds= { true }> 2000 - 01 - 31T11 : 59 : 00 - 05 : 00 < / DayJS>
178
178
```
179
179
180
180
This will output:
181
181
182
182
``` html
183
- <time >949341540 </time >
183
+ <time >949337940 </time >
184
184
```
185
185
186
186
### unixMilliseconds
@@ -189,13 +189,13 @@ _unixMilliseconds = { boolean }_
189
189
Displays the time as a unix timestamp in milliseconds (the number of milliseconds since Unix Epoch).
190
190
191
191
``` jsx
192
- < DayJS unixMilliseconds= { true }> 2000 - 01 - 31T12 : 59 - 0500 < / DayJS>
192
+ < DayJS unixMilliseconds= { true }> 2000 - 01 - 31T11 : 59 : 00 - 05 : 00 < / DayJS>
193
193
```
194
194
195
195
This will output:
196
196
197
197
``` html
198
- <time >949341540000 </time >
198
+ <time >949337940000 </time >
199
199
```
200
200
201
201
### daysInMonth
@@ -204,7 +204,7 @@ _daysInMonth = { boolean }_
204
204
Displays the number of days in the month of the given time.
205
205
206
206
``` jsx
207
- < DayJS daysInMonth= { true }> 2000 - 01 - 31T12 : 59 - 0500 < / DayJS>
207
+ < DayJS daysInMonth= { true }> 2000 - 01 - 31T11 : 59 : 00 - 05 : 00 < / DayJS>
208
208
```
209
209
210
210
This will output:
@@ -219,7 +219,7 @@ _displayIsValid = { boolean }_
219
219
Displays if the given date is valid.
220
220
221
221
``` jsx
222
- < DayJS displayIsValid= { true }> 2000 - 01 - 31T12 : 59 - 0500 < / DayJS>
222
+ < DayJS displayIsValid= { true }> 2000 - 01 - 31T11 : 59 : 00 - 05 : 00 < / DayJS>
223
223
```
224
224
225
225
This will output:
0 commit comments