One line of code compares the age of user A and user B (calculated on two dates), one line
Two date calculation
Usage:
<Edate [id = schoolbag name] [list]>
<We start = "start Date" end = "end Date" [format = "yyyy-MM-dd HH: mm: ss. SSS"]/>
</Edate>
· Id: schoolbag name. The name of the schoolbag returned by the EDate label. Optional. If it is null, the schoolbag name is the tag name edate.
· List: list (Optional). Do you want to list all dates from start to end?
· Start: start date, for example, 00:00:00. 000
· End: end date, for example, 23:59:59. 999
· Format: format, Date format
Example 0:
Compare the age of user A and user B
Birthday of two people
<bag id=pPage> <we name=userABirthday>1987-02-02</we> <we name=userBBirthday>1989-09-18</we></bag>
One line of code compares the age of user A and user B
<edate id=test><we start="@{pPage:userABirthday}"end="@{pPage:userBBirthday}" /></edate>
Output comparison results
<If x = "@ {test: after} "> <p x = 1> <B> User A </B> is older than <B> User B </B> @ {test: y} years old and @ {int: @ {test: month }%12} months </p> <p x =-1> <B> User A </B> is younger than <B> User B </B> @{ test: y} years old and @ {int: @ {test: month} % 12} months </p> </if>
Complete computing information output
<B> complete output </B> <table border = 1> <tr> <th> key </th> <th> value </th> </tr> <end = "@ {test: getWidth} "> <tr> <td >@{ test :@{ for: getSuffix }}</td> <td >@{ test :@{ test :{: getSuffix }}</td> </tr> </for> </table>
Effect
Complete code
<Html> <title> compare the age of user A and user B </title>
Pass@ {Test: key}You can retrieve the expected results.
(Example file: _ samples/date-2birthday.html) inLight PlatformUnder the _ samples Directory
Download Easy Do IT resources
Platform and the latest development manual free download: http://download.csdn.net/detail/tx18/8464425
Development Instance:Light B2C e-commerce websites, Free download: http://download.csdn.net/detail/tx18/8318585
The light-Open Platform will occasionally upgrade to provide more powerful and Easy functions for you. Please note thatDownload the latest version