<commit_before>/**
 * @module  calendar
 * @author  <NAME> <<EMAIL>>
 */

/**
 * @property config
 */
exports.config = _.extend({
}, Alloy.CFG.T ? Alloy.CFG.T.calendar : {});

var Util = require('T/util');
var Moment = require('alloy/moment');
var Permissions = require('T/permissions');

var RRule = require('T/ext/rrule');
exports.RRule = RRule;

if (OS_ANDROID) {
	var LDACalendar = require('lucadamico.android.calendar');
}

var RRT = {
	IOS_DATE_FORMAT: 'YYYY-MM-DDTHH:mm:ss.SSS+0000',
	map: {
		IOS_to_RR: {
			frequency: {},
			weekday: {},
		},
	},
	props: {
		RR_to_IOS: {
			interval : 'interval',
			count: 'end.occurrenceCount',
			until: function(ios, value) { ios.end = { endDate: Moment(value).format(RRT.IOS_DATE_FORMAT) }; },
			freq : 'frequency',
			bymonth: 'monthsOfTheYear',
			bymonthday: 'daysOfTheMonth',
			byyearday: 'daysOfTheYear',
			byweekday: function(ios, value) {
				ios.daysOfTheWeek = value.map(function(day) {
					return { dayOfWeek: RRT.map.RR_to_IOS.weekday[ JSON.stringify(day) ] };
				});
			}
		},
		IOS_to_RR: {
			interval : 'interval',
			'end.occurrenceCount': 'count',
			'end.endDate': function(rruleOpt, value) { rruleOpt.until = Moment(value).toDate(); },<commit_msg>RRUle exports in global side<commit_after>/**
 * @module  calendar
 * @author  <NAME> <<EMAIL>>
 */

/**
 * @property config
 */
exports.config = _.extend({
}, Alloy.CFG.T ? Alloy.CFG.T.calendar : {});

var Util = require('T/util');
var Moment = require('alloy/moment');
var Permissions = require('T/permissions');

require('T/ext/rrule');
exports.RRule = RRule;

if (OS_ANDROID) {
	var LDACalendar = require('lucadamico.android.calendar');
}

var RRT = {
	IOS_DATE_FORMAT: 'YYYY-MM-DDTHH:mm:ss.SSS+0000',
	map: {
		IOS_to_RR: {
			frequency: {},
			weekday: {},
		},
		RR_to_IOS: {
			freq: {},
			weekday: {},
		},
	},
	props: {
		RR_to_IOS: {
			interval : 'interval',
			count: 'end.occurrenceCount',
			until: function(ios, value) { ios.end = { endDate: Moment(value).format(RRT.IOS_DATE_FORMAT) }; },
			freq : 'frequency',
			bymonth: 'monthsOfTheYear',
			bymonthday: 'daysOfTheMonth',
			byyearday: 'daysOfTheYear',
			byweekday: function(ios, value) {
				ios.daysOfTheWeek = value.map(function(day) {
					return { dayOfWeek: RRT.map.RR_to_IOS.weekday[ JSON.stringify(day) ] };
				});
			}
		},
		IOS_to_RR: {
			interval : 'interval',
			'end.occurrenceCount': 'count',
			'end.endDate': function(rruleOpt, value) { rruleOpt.until = Moment(value).toDate(); },
{'fraction_non_alphanumeric': 0.18418940609951845, 'fraction_numerical': 0.0032102728731942215, 'mean_word_length': 3.8978388998035363, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5769132', 'n_tokens_mistral': 1087, 'n_tokens_neox': 970, 'n_words': 161}