7 kyu

Gigasecond

274noku

Description:

Write a program that will calculate the date that someone turned or will celebrate their next 1 Gs anniversary.

You are a given a date as parameter and you need to return the date of 1 Gs from the given date.

A gigasecond is one billion (10**9) seconds.

Example (Ruby)

gigasecond(Date.new(2011, 4, 25))
# => <Date: 2043-01-01 ((2467251j,0s,0n),+0s,2299161j)>

Assumptions

You can assume that you are only given a valid date object.

Fundamentals

More By Author:

Check out these other kata created by noku

Stats:

CreatedAug 24, 2014
PublishedAug 24, 2014
Warriors Trained742
Total Skips172
Total Code Submissions688
Total Times Completed274
Ruby Completions274
Total Stars7
% of votes with a positive feedback rating89% of 79
Total "Very Satisfied" Votes65
Total "Somewhat Satisfied" Votes11
Total "Not Satisfied" Votes3
Total Rank Assessments49
Average Assessed Rank
7 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • noku Avatar
  • jhoffner Avatar
  • cliffstamp Avatar
Ad