Cody

Solution 1295418

Submitted on 18 Oct 2017
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
format long format compact datestr(now) x=Top_of_Hour; y=now; datestr(y) mmss_dec=rem(y*24,1) % hh:59:59 is 0.99972 Pass=0; if mmss_dec<2/3600,Pass=1;end % 2 second threshold assert(Pass==1,sprintf('%s',datestr(y)))

ans = '18-Oct-2017 12:03:45' s = 45.736927000000001 s = 46.237524000000001 s = 46.738135000000000 s = 47.238778000000003 s = 47.741028999999997 s = 48.241660000000003 s = 48.741911000000002 s = 49.242151000000000 s = 49.742392000000002 s = 50.242617000000003 s = 50.742856000000003 s = 51.243094999999997 s = 51.743341999999998 s = 52.243631999999998 s = 52.743873000000001 s = 53.244141999999997 s = 53.745362999999998 s = 54.245649999999998 s = 54.746169000000002 s = 55.246395999999997 s = 55.746676000000001 s = 56.246966000000000 s = 56.747207000000003 s = 57.247495000000001 s = 57.747779999999999 s = 58.248035999999999 s = 58.748319000000002 s = 59.248567999999999 s = 59.748829999999998 s = 0.249075000000000 ans = '18-Oct-2017 12:04:00' mmss_dec = 0.066736049950123

18-Oct-2017 12:04:00