[lp_date_days1970]

Description

Link: [lp_date_days1970]
Author: Bil Corry
Category: Date
Version: 8.x
License: Public Domain
Posted: Dec. 06, 2005
Updated: Jan. 01, 0001
More by this author...
Returns number of days since 1/1/1970.

Parameters

-date date, optional The date to use to calculate. Default is server's current date.

Sample Usage

lp_date_days1970: (date: '12/30/2005'); // returns 13147
						

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[

define_tag:'lp_date_days1970',
	-description='Returns number of days since 1/1/1970.',
	-priority='replace',
	-optional='date',-copy,-type='date';
	
	if: !local_defined:'date';
		local:'date' = date;
	/if;
	
	#date->(setformat:'%D');
	return: (date_difference: (date: (string:#date) + ' 12:00:00'), (date:'1/1/1970 12:00:00') ,-day);
/define_tag;

]

 

Related Tags



Comments

none

Email:


Password:



Newest

Most Popular

Support tagSwap.net