/ Published in: Scala
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
 -module(cal). -export([main/0]). main() -> StartSec = calendar:datetime_to_gregorian_seconds({{2009,1,1},{0,0,0}}), EndSec = calendar:datetime_to_gregorian_seconds({{2009,12,31},{0,0,0}}), init:stop() ; { {Year,Month,Day} ,_Time} = calendar:gregorian_seconds_to_datetime(CurSec), io:format("~p/~p/~p ~n", [Year,Month,Day]), NewSec = CurSec + 60*60*24, run_calendar(NewSec > EndSec, NewSec, EndSec).
Comments
                    Subscribe to comments
                
                