Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @format
*/
import React, { Component } from 'react';
import {
StyleSheet,
View,
Alert,
} from 'react-native';
import WeekView, { addLocale } from 'react-native-week-view';
addLocale('fr', {
months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
});
export default class App extends Component {
selectedDate = new Date();
generateDates = (hours, minutes) => {
const date = new Date();
date.setHours(date.getHours() + hours);
if (minutes != null) {
date.setMinutes(minutes);
}
return date;