6 kyu

Numerology

2,138 of 2,214user4806669

Description:

In numerology, every number has a certain meaning that expresses someones connection to the universe! This single digit integer can be calculated by adding up every digit in the birthdate: year, month, and date.

Task

Calculate the single integer digit by adding up every digit in the birthdate: month, date, full year, from left to right (MMDDYYYY). If the sum is greater or equal to 10, add up the two digits of the sum.

You will be passed in a Date object corresponding to your language.

Example

For example, with date '06/14/2010'

=> 06142010

sum digits left action
0 06142010 0+0
0 6142010 0+6
6 142010 6+1
7 42010 7+4
11 2010 1+1 (sum is greater or equal to 10)
2 2010 2+2
4 010 4+0
4 10 4+1
5 0 5+0
5 done

So, what is your number?

Date Time
Fundamentals

Stats:

CreatedOct 14, 2013
PublishedOct 14, 2013
Warriors Trained5082
Total Skips1380
Total Code Submissions21017
Total Times Completed2214
JavaScript Completions2138
COBOL Completions3
Total Stars47
% of votes with a positive feedback rating93% of 168
Total "Very Satisfied" Votes148
Total "Somewhat Satisfied" Votes16
Total "Not Satisfied" Votes4
Ad
Contributors
  • user4806669 Avatar
  • jhoffner Avatar
  • flaco Avatar
  • eb110 Avatar
  • cliffstamp Avatar
  • akar-0 Avatar
  • dfhwze Avatar
  • XoRMiAS Avatar
Ad