'use strict';

/**
 * Contains a mapping from time to time phrases, i.e., 7:30 corresponds to
 * "SEVEN", "THIRTY". You can update this to your favourite language. Note that
 * you must also update the content of the LetterGridService
 * @ngdoc service
 * @name qlocktwoAngularApp.TimeToPhrases
 * @description
 * # TimeToPhrases
 * Service in the qlocktwoAngularApp.
 */
angular.module('qlocktwoAngularApp')
  .service('TimeToPhrases', function () {

    var hours = [{hour: 1, word: 'one'},
                 {hour: 2, word: 'two'},
                 {hour: 3, word: 'three'},
                 {hour: 4, word: 'four'},
                 {hour: 5, word: 'five'},
                 {hour: 6, word: 'six'},
                 {hour: 7, word: 'seven'},
                 {hour: 8, word: 'eight'},
                 {hour: 9, word: 'nine'},
                 {hour: 10, word: 'ten'},
                 {hour: 11, word: 'eleven'},
                 {hour: 12, word: 'twelve'}];

    var minutes = [{minute: 0, word: 'clock'},
                  {minute: 5, word: 'five'},
                  {minute: 10, word: 'ten'},
                  {minute: 15, word: 'fifteen'},
                  {minute: 20, word: 'twenty'},
                  {minute: 30, word: 'thirty'},
                  {minute: 40, word: 'forty'},
                  {minute: 50, word: 'fifty'}];

    return {hours: hours, minutes: minutes};
  });

@@ -445,16 +445,53 @@
 n () %7B%0A%0A
+    // Here put your words for hours%0A
     var 
@@ -994,41 +994,684 @@
 ve'%7D
-%5D;%0A%0A    var minutes = %5B%7Bminute: 0
+,%0A                  %7Bhour: 13, word: 'one'%7D,%0A                  %7Bhour: 14, word: 'two'%7D,%0A                  %7Bhour: 15, word: 'three'%7D,%0A                  %7Bhour: 16, word: 'four'%7D,%0A                  %7Bhour: 17, word: 'five'%7D,%0A                  %7Bhour: 18, word: 'six'%7D,%0A                  %7Bhour: 19, word: 'seven'%7D,%0A                  %7Bhour: 20, word: 'eight'%7D,%0A                  %7Bhour: 21, word: 'nine'%7D,%0A                  %7Bhour: 22, word: 'ten'%7D,%0A                  %7Bhour: 23, word: 'eleven'%7D,%0A                  %7Bhour: 24, word: 'twelve'%7D%5D;%0A%0A    // Here put your word for minutes%0A    // This will be displayed if time is in interval %5Bstart, end%5D%0A    var minutes = %5B%7Bstart: 0, end:  5
 , wo
@@ -1703,25 +1703,34 @@
        %7B
-minute: 5
+start:  5, end:  9
 , word: 
@@ -1761,18 +1761,26 @@
    %7B
-minute: 10
+start: 10, end: 14
 , wo
@@ -1814,18 +1814,26 @@
    %7B
-minute: 15
+start: 15, end: 19
 , wo
@@ -1871,18 +1871,26 @@
    %7B
-minute: 20
+start: 20, end: 29
 , wo
@@ -1927,18 +1927,26 @@
    %7B
-minute: 30
+start: 30, end: 39
 , wo
@@ -1983,18 +1983,26 @@
    %7B
-minute: 40
+start: 40, end: 49
 , wo
@@ -2038,18 +2038,26 @@
    %7B
-minute: 50
+start: 50, end: 59
 , wo

add comments