List of scripts

Examples of scripts usage


func_getlastbackup (by id) – get last backup basing on id

func_getlastbackup (by creation time) – get last backup basing on creation time property

func_cmp2dates – compare dates in format “jan/01/1970”

func_date2int – convert date in format “jan/01/1970” to int to allow dates comparing

func_time2int – convert time in format “HH:MM:SS: to seconds to allow time comparing

func_datetime2str – get date/time in “YYYY-MM-DD_HHMMSS” format


Backuping

Step 1. Generate backup.

Step 2. Try send via Mail

Step 3. Try send via FTP

Step 4. Create backups log and send it via Mail

Full backup script v1.4 (not sends backups via mail)


Dates manipulation module

func_datetime2str – generates string from date and time

func_cmp2dates – compare two dates

func_daysInMonth – get days in the month

func_daysInYear – get days in the year

func_shiftDate – add/sub days to given date

func_subDates – count days between two given days

func_date2days – count days from base (01/01/1970 by default) to given date

test_dates – script to test all dates manipulation functions. Can be used as example for importing functions to your code.

Full script is here – dates-v1.1.rsc

Module discussion is here .