Megatest

Diff
Login

Differences From Artifact [933bab82d3]:

To Artifact [7e22939ef4]:


1852
1853
1854
1855
1856
1857
1858
1859

1860
1861
1862

1863
1864
1865

1866
1867
1868
1869
1870
1871
1872
1852
1853
1854
1855
1856
1857
1858

1859
1860
1861

1862
1863
1864

1865
1866
1867
1868
1869
1870
1871
1872







-
+


-
+


-
+







		  (if match
		      (let ((val (string->number (cadr match)))
			    (unt (caddr match)))
			(if val 
			    (set! time-secs (+ time-secs (* val
							    (case (string->symbol unt)
							      ((s) 1)
							      ((m) 60)
							      ((m) 60) ;; minutes
							      ((h) 3600)
							      ((d) 86400)
							      ((2) 604800)
							      ((w) 604800)
							      ((M) 2628000) ;; aproximately one month
							      ((y) 31536000)
							      (else 0))))))))))
							      (else #f))))))))))
	      parts)
    time-secs))
		       
(define (seconds->hr-min-sec secs)
  (let* ((hrs (quotient secs 3600))
	 (min (quotient (- secs (* hrs 3600)) 60))
	 (sec (- secs (* hrs 3600)(* min 60))))