Use array literals

pull/21833/head
David Baker 2017-05-25 18:26:42 +01:00
parent 6c41be3c14
commit c3c2916449
1 changed files with 24 additions and 23 deletions

View File

@ -1,5 +1,6 @@
/* /*
Copyright 2015, 2016 OpenMarket Ltd Copyright 2015, 2016 OpenMarket Ltd
Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@ -18,32 +19,32 @@ limitations under the License.
import { _t } from './languageHandler'; import { _t } from './languageHandler';
function getDaysArray() { function getDaysArray() {
var days = []; return [
days.push(_t('Sun')); _t('Sun'),
days.push(_t('Mon')); _t('Mon'),
days.push(_t('Tue')); _t('Tue'),
days.push(_t('Wed')); _t('Wed'),
days.push(_t('Thu')); _t('Thu'),
days.push(_t('Fri')); _t('Fri'),
days.push(_t('Sat')); _t('Sat'),
return days; ];
} }
function getMonthsArray() { function getMonthsArray() {
var months = []; return [
months.push(_t('Jan')); _t('Jan'),
months.push(_t('Feb')); _t('Feb'),
months.push(_t('Mar')); _t('Mar'),
months.push(_t('Apr')); _t('Apr'),
months.push(_t('May')); _t('May'),
months.push(_t('Jun')); _t('Jun'),
months.push(_t('Jul')); _t('Jul'),
months.push(_t('Aug')); _t('Aug'),
months.push(_t('Sep')); _t('Sep'),
months.push(_t('Oct')); _t('Oct'),
months.push(_t('Nov')); _t('Nov'),
months.push(_t('Dec')); _t('Dec'),
return months; ];
} }
function pad(n) { function pad(n) {