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
class MyApp extends Component { | |
fullCalendar = React.createRef() | |
render() { | |
return ( | |
<div> | |
<button onClick={ this.handleNext }>goto next</button> | |
<FullCalendar ref={ this.fullCalendar } /> |
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
// The goal of this language config is to give FullCalendar everything it needs for | |
// translations (in this case, French). This happens to be a merge of Moment's and | |
// the jQuery UI datepicker's configs, in addition to some other strings. | |
// | |
// Additionally, when this config is loaded, Moment and the jQuery UI datepicker | |
// (if it is on the page) will also be initialized. | |
// | |
(function(){ | |
function onload (moment, $) { |
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
// You can add new locales by adding a new object to the `XDate.locales` hash. | |
// You can change the default locale by changing `XDate.defaultLocale`. | |
XDate.locales['fr'] = { | |
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre'], | |
monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin','Juil.','Août','Sept.','Oct.','Nov.','Déc.'], | |
dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'], | |
dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'] | |
}; |
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
new Temporal.ZonedDateTime(nano, timeZone, calendar) | |
/* instead: */ Temporal.Instant.fromEpochMilliseconds(milli) | |
/* */ .toZonedDateTimeISO(timeZone) | |
/* OR */ | |
/* instead: */ Temporal.Instant.fromEpochMilliseconds(milli) | |
/* */ .toZonedDateTime({ timeZone, calendar }) | |
zonedDateTime.epochMicroseconds | |
/* instead: */ zonedDateTime.epochMilliseconds |
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
/* | |
Called towards the end of Duration::round when either: | |
- "relativeTo" is a ZonedDateTime | |
- "relativeTo" is a PlainDate | |
Also called towards the end of PlainDateTime/PlainDate::since/until when largestUnit > day | |
Also called towards the end of ZonedDateTime::since/until when largestUnit >= day | |
Avoids concepts of balancing/unbalancing/normalizing that the original algorithm uses, | |
a lot of which seems repetitive. Instead, leverages epoch-nanosecond comparisons. | |
Both more performant and smaller code size. |
OlderNewer