mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
fix typo
fix: date.toTime() => date.getTime()
This commit is contained in:
1 parent
4386a3664d
commit
ab654b129f
1 file changed
+1
-1
@@ -103,7 +103,7 @@ RCT_EXPORT_METHOD(addEvent:(NSString *)name location:(NSString *)location date:(
|
||||
You would then call this from JavaScript by using either:
|
||||
|
||||
```javascript
|
||||
CalendarManager.addEvent('Birthday Party', '4 Privet Drive, Surrey', date.toTime()); // passing date as number of seconds since Unix epoch
|
||||
CalendarManager.addEvent('Birthday Party', '4 Privet Drive, Surrey', date.getTime()); // passing date as number of seconds since Unix epoch
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
Reference in new issue
Block a user