2016-03-30 23:04:14 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								USING: accessors kernel math.order random threads tools.test ;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								IN: calendar
							 | 
						
					
						
							
								
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2017-01-05 07:28:13 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								[ 2004 12 32 0   0  0 instant <timestamp> ] [ not-in-interval? ] must-fail-with
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								[ 2004  2 30 0   0  0 instant <timestamp> ] [ not-in-interval? ] must-fail-with
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								[ 2003  2 29 0   0  0 instant <timestamp> ] [ not-in-interval? ] must-fail-with
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								[ 2004 -2  9 0   0  0 instant <timestamp> ] [ not-in-interval? ] must-fail-with
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								[ 2004 12  0 0   0  0 instant <timestamp> ] [ not-in-interval? ] must-fail-with
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								[ 2004 12  1 24  0  0 instant <timestamp> ] [ not-in-interval? ] must-fail-with
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								[ 2004 12  1 23 60  0 instant <timestamp> ] [ not-in-interval? ] must-fail-with
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								[ 2004 12  1 23 59 60 instant <timestamp> ] [ not-in-interval? ] must-fail-with
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ } [
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    2014 12 1 23 59 59+99/100 instant <timestamp> drop
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ f } [ 1900 leap-year? ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ t } [ 1904 leap-year? ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2000 leap-year? ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ f } [ 2001 leap-year? ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ f } [ 2006 leap-year? ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 10 10 0 0 0 instant <timestamp> 1 seconds time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 10 10 0 0 1 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 10 10 0 0 0 instant <timestamp> 100 seconds time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 10 10 0 1 40 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 10 10 0 0 0 instant <timestamp> -100 seconds time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 10 9 23 58 20 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 10 10 0 0 0 instant <timestamp> 86400 seconds time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 10 11 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 10 10 0 0 0 instant <timestamp> 10 minutes time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 10 10 0 10 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ +eq+ } [ 2006 10 10 0 0 0 instant <timestamp> 10.5 minutes time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-02 03:48:35 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        2006 10 10 0 10 30 instant <timestamp> <=> ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 10 10 0 0 0 instant <timestamp> 3/4 minutes time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 10 10 0 0 45 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 10 10 0 0 0 instant <timestamp> -3/4 minutes time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 10 9 23 59 15 instant <timestamp> = ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 10 10 0 0 0 instant <timestamp> 7200 minutes time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 10 15 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 10 10 0 0 0 instant <timestamp> -10 minutes time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 10 9 23 50 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 10 10 0 0 0 instant <timestamp> -100 minutes time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 10 9 22 20 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> 1 hours time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 1 1 1 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> 24 hours time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 1 2 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> -24 hours time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2005 12 31 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> 12 hours time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 1 1 12 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> 72 hours time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 1 4 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> 1 days time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 1 2 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> -1 days time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2005 12 31 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> 365 days time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2007 1 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> -365 days time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2005 1 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2004 1 1 0 0 0 instant <timestamp> 365 days time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2004 12 31 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2004 1 1 0 0 0 instant <timestamp> 366 days time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2005 1 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> 11 months time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 12 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> 12 months time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2007 1 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> 24 months time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2008 1 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> 13 months time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2007 2 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> 1 months time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 2 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> 0 months time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 1 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> -1 months time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2005 12 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> -2 months time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2005 11 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> -13 months time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2004 12 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> -24 months time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2004 1 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2004 2 29 0 0 0 instant <timestamp> 12 months time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2005 3 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2004 2 29 0 0 0 instant <timestamp> -12 months time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2003 3 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> 0 years time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2006 1 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> 1 years time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2007 1 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> -1 years time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2005 1 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 1 1 0 0 0 instant <timestamp> -100 years time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        1906 1 1 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								! [ t ] [ 2004 2 29 0 0 0 instant <timestamp> -1 years time+
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								!         2003 2 28 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ 5 } [ 2006 7 14 0 0 0 instant <timestamp> day-of-week ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2006 7 14 [ julian-day-number julian-day-number>date 0 0 0 instant <timestamp> ] 3keep 0 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ 1 } [ 2006 1 1 0 0 0 instant <timestamp> day-of-year ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ 60 } [ 2004 2 29 0 0 0 instant <timestamp> day-of-year ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ 61 } [ 2004 3 1 0 0 0 instant <timestamp> day-of-year ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ 366 } [ 2004 12 31 0 0 0 instant <timestamp> day-of-year ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ 365 } [ 2003 12 31 0 0 0 instant <timestamp> day-of-year ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ 60 } [ 2003 3 1 0 0 0 instant <timestamp> day-of-year ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2004 12 31 0 0 0 instant <timestamp> dup = ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2004 1 1 0 0 0 instant <timestamp> 10 seconds 5 years time+ time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2009 1 1 0 0 10 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2004 1 1 0 0 0 instant <timestamp> -10 seconds -5 years time+ time+
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        1998 12 31 23 59 50 instant <timestamp> = ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2004 1 1 23 0 0 12 hours <timestamp> >gmt
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2004 1 1 11 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2004 1 1 5 0 0 -11 hours <timestamp> >gmt
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2004 1 1 16 0 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 2004 1 1 23 0 0 9+1/2 hours <timestamp> >gmt
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2004 1 1 13 30 0 instant <timestamp> = ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ +eq+ } [ 2004 1 1 13 30 0 instant <timestamp>
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2004 1 1 12 30 0 -1 hours <timestamp> <=> ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ +gt+ } [ 2004 1 1 13 30 0 instant <timestamp>
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2004 1 1 12 30 0 instant <timestamp> <=> ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ +lt+ } [ 2004 1 1 12 30 0 instant <timestamp>
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2004 1 1 13 30 0 instant <timestamp> <=> ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ +gt+ } [ 2005 1 1 12 30 0 instant <timestamp>
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-19 20:15:32 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        2004 1 1 13 30 0 instant <timestamp> <=> ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2008-02-26 18:22:48 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 0 micros>timestamp unix-1970 = ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ t } [ 123456789000000 [ micros>timestamp timestamp>micros ] keep = ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ t } [ 123456789123456000 [ micros>timestamp timestamp>micros ] keep = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2008-02-26 18:22:48 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-03-23 01:34:02 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								: checktime+ ( duration -- ? ) now dup clone [ rot time+ drop ] keep = ;
							 | 
						
					
						
							
								
									
										
										
										
											2008-02-26 18:22:48 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 5 seconds checktime+ ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2008-02-26 18:22:48 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 5 minutes checktime+ ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2008-02-26 18:22:48 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 5 hours checktime+ ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2008-02-26 18:22:48 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 5 days checktime+ ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2008-02-26 18:22:48 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 5 weeks checktime+ ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2008-02-26 18:22:48 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 5 months checktime+ ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2008-02-26 18:22:48 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 5 years checktime+ ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2008-04-26 19:44:28 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ now 50 milliseconds sleep now before? ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ t } [ now 50 milliseconds sleep now swap after? ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ t } [ now 50 milliseconds sleep now 50 milliseconds sleep now swapd between? ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2009-04-25 22:21:15 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ 4 12 } [ 2009 easter [ month>> ] [ day>> ] bi ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ 4 2 } [ 1961 easter [ month>> ] [ day>> ] bi ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2009-04-25 22:21:15 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ f } [ now dup midnight eq? ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ f } [ now dup easter eq? ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ f } [ now dup beginning-of-year eq? ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-14 22:10:54 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 1325376000 unix-time>timestamp 2012 <year-gmt> = ] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ t } [ 1356998399 unix-time>timestamp 2013 <year-gmt> 1 seconds time- = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-14 22:10:54 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [ 1500000000 random [ unix-time>timestamp timestamp>unix-time ] keep = ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2010-03-20 19:38:23 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [
							 | 
						
					
						
							
								
									
										
										
										
											2010-03-20 19:38:23 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    2009 1 29 <date> 1 months time+
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    2009 3 1 <date> =
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								] unit-test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ t } [
							 | 
						
					
						
							
								
									
										
										
										
											2010-03-20 19:38:23 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    2008 1 29 <date> 1 months time+
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    2008 2 29 <date> =
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2010-07-18 16:45:00 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-02 20:28:17 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ 0 }
							 | 
						
					
						
							
								
									
										
										
										
											2010-07-18 16:45:00 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								[ gmt gmt-offset>> duration>seconds ] unit-test
							 | 
						
					
						
							
								
									
										
										
										
											2017-01-05 07:28:13 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								! am
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								[ now 30 am ] [ not-in-interval? ] must-fail-with
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								! pm
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								[ now 30 pm ] [ not-in-interval? ] must-fail-with
							 |