Showing
1 changed file
with
56 additions
and
20 deletions
| ... | @@ -52,10 +52,10 @@ function handleEvent(event) { | ... | @@ -52,10 +52,10 @@ function handleEvent(event) { |
| 52 | 52 | ||
| 53 | setTime.setMinutes(smin); | 53 | setTime.setMinutes(smin); |
| 54 | 54 | ||
| 55 | - var res1 = new Date(setTime.getTime() - 270 * 60000); | 55 | + var gres1 = new Date(setTime.getTime() - 270 * 60000); |
| 56 | - var res2 = new Date(res1.getTime() - 90 * 60000); | 56 | + var gres2 = new Date(res1.getTime() - 90 * 60000); |
| 57 | - var res3 = new Date(res2.getTime() - 90 * 60000); | 57 | + var gres3 = new Date(res2.getTime() - 90 * 60000); |
| 58 | - var res4 = new Date(res3.getTime() - 90 * 60000); | 58 | + var gres4 = new Date(res3.getTime() - 90 * 60000); |
| 59 | 59 | ||
| 60 | function retDate(dateObj) { | 60 | function retDate(dateObj) { |
| 61 | var formatted = ''; | 61 | var formatted = ''; |
| ... | @@ -91,10 +91,10 @@ function handleEvent(event) { | ... | @@ -91,10 +91,10 @@ function handleEvent(event) { |
| 91 | return formatted; | 91 | return formatted; |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | - console.log(String(retDate(res1))); | 94 | + console.log(String(retDate(gres1))); |
| 95 | - console.log(String(retDate(res2))); | 95 | + console.log(String(retDate(gres2))); |
| 96 | - console.log(String(retDate(res3))); | 96 | + console.log(String(retDate(gres3))); |
| 97 | - console.log(String(retDate(res4))); | 97 | + console.log(String(retDate(gres4))); |
| 98 | 98 | ||
| 99 | $('#results').fadeIn(); | 99 | $('#results').fadeIn(); |
| 100 | $('#feedback').fadeIn(); | 100 | $('#feedback').fadeIn(); |
| ... | @@ -111,12 +111,12 @@ function sleep(ghour, gmin, ampm) { //ëª‡ì‹œì— ì¼ì–´ë‚˜ë ¤ê³ í• ë•Œ ì–¸ì œ ì | ... | @@ -111,12 +111,12 @@ function sleep(ghour, gmin, ampm) { //ëª‡ì‹œì— ì¼ì–´ë‚˜ë ¤ê³ í• ë•Œ ì–¸ì œ ì |
| 111 | //$('#start').hide(); | 111 | //$('#start').hide(); |
| 112 | var zDate = new Date(); | 112 | var zDate = new Date(); |
| 113 | 113 | ||
| 114 | - var res1 = new Date(zDate.getTime() + 104*60000); | 114 | + var sres1 = new Date(zDate.getTime() + 104*60000); |
| 115 | - var res2 = new Date(res1.getTime() + 90*60000); | 115 | + var sres2 = new Date(res1.getTime() + 90*60000); |
| 116 | - var res3 = new Date(res2.getTime() + 90*60000); | 116 | + var sres3 = new Date(res2.getTime() + 90*60000); |
| 117 | - var res4 = new Date(res3.getTime() + 90*60000); | 117 | + var sres4 = new Date(res3.getTime() + 90*60000); |
| 118 | - var res5 = new Date(res4.getTime() + 90*60000); | 118 | + var sres5 = new Date(res4.getTime() + 90*60000); |
| 119 | - var res6 = new Date(res5.getTime() + 90*60000); | 119 | + var sres6 = new Date(res5.getTime() + 90*60000); |
| 120 | 120 | ||
| 121 | function retDate(dateObj) { | 121 | function retDate(dateObj) { |
| 122 | var formatted = ''; | 122 | var formatted = ''; |
| ... | @@ -145,17 +145,53 @@ function sleep(ghour, gmin, ampm) { //ëª‡ì‹œì— ì¼ì–´ë‚˜ë ¤ê³ í• ë•Œ ì–¸ì œ ì | ... | @@ -145,17 +145,53 @@ function sleep(ghour, gmin, ampm) { //ëª‡ì‹œì— ì¼ì–´ë‚˜ë ¤ê³ í• ë•Œ ì–¸ì œ ì |
| 145 | return formatted; | 145 | return formatted; |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | - console.log(String(retDate(res1))); | 148 | + console.log(String(retDate(sres1))); |
| 149 | - console.log(String(retDate(res2))); | 149 | + console.log(String(retDate(sres2))); |
| 150 | - console.log(String(retDate(res3))); | 150 | + console.log(String(retDate(sres3))); |
| 151 | - console.log(String(retDate(res4))); | 151 | + console.log(String(retDate(sres4))); |
| 152 | - console.log(String(retDate(res5))); | 152 | + console.log(String(retDate(sres5))); |
| 153 | - console.log(String(retDate(res6))); | 153 | + console.log(String(retDate(sres6))); |
| 154 | 154 | ||
| 155 | $('#resultsNow').fadeIn(); | 155 | $('#resultsNow').fadeIn(); |
| 156 | $('#feedback').fadeIn(); | 156 | $('#feedback').fadeIn(); |
| 157 | $('#ad').fadeIn(); | 157 | $('#ad').fadeIn(); |
| 158 | }; | 158 | }; |
| 159 | +//sleep 함수 | ||
| 160 | +console.log("You should try to fall asleep at one of the following times: "); | ||
| 161 | +"sres1" title="Six Cycles: Nine Hours of Sleep" | ||
| 162 | +or | ||
| 163 | +"sres2" title="Five Cycles: Seven and a half Hours of Sleep" | ||
| 164 | +or | ||
| 165 | +"sres3" title="Four Cycles: Six Hours of Sleep" | ||
| 166 | +or | ||
| 167 | +"sres4" title="Three Cycles: Four and a half Hours of Sleep"> | ||
| 168 | + | ||
| 169 | +console.log("Please keep in mind that you should be falling asleep at these times."); | ||
| 170 | +console.log("The average human takes fourteen minutes to fall asleep, so plan accordingly!"); | ||
| 171 | + | ||
| 172 | +console.log("꿀잠봇 works by counting backwards in sleep cycles."); | ||
| 173 | +console.log("Waking up in the middle of a sleep cycle leaves you feeling tired and groggy, but waking up in between cycles wakes you up feeling refreshed and alert!"); | ||
| 174 | +console.log("A good night's sleep consists of 5-6 complete sleep cycles."); | ||
| 175 | +//getup 함수 | ||
| 176 | +console.log("If you head to bed right now, you should try to wake up at one of the following times:"); | ||
| 177 | +"gres1" title="One Cycle: One and a half Hours of Sleep" | ||
| 178 | +or | ||
| 179 | +"gres2" title="Two Cycles: Three Hours of Sleep" | ||
| 180 | +or | ||
| 181 | +"gres3" title="Three Cycles: Four and a half Hours of Sleep" | ||
| 182 | +or | ||
| 183 | +"gres4" title="Four Cycles: Six Hours of Sleep" | ||
| 184 | +or | ||
| 185 | +"gres5" title="Five Cycles: Seven and a half Hours of Sleep" | ||
| 186 | +or | ||
| 187 | +"gres6" title="Six Cycles: Nine Hours of Sleep" | ||
| 188 | + | ||
| 189 | +console.log("Please keep in mind that you should try to wake up at one of these times."); | ||
| 190 | +console.log("The average human takes fourteen minutes to fall asleep, so plan accordingly!"); | ||
| 191 | + | ||
| 192 | +console.log("꿀잠봇 works by counting backwards in sleep cycles."); | ||
| 193 | +console.log("Waking up in the middle of a sleep cycle leaves you feeling tired and groggy, but waking up in between cycles wakes you up feeling refreshed and alert!"); | ||
| 194 | +console.log("A good night's sleep consists of 5-6 complete sleep cycles."); | ||
| 159 | /* | 195 | /* |
| 160 | //언어 감지 option | 196 | //언어 감지 option |
| 161 | var detect_options = { | 197 | var detect_options = { | ... | ... |
-
Please register or login to post a comment