⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.78
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
psa-pear
/
pear
/
tests
/
Date
/
tests
/
View File Name :
test_date_methods_span.php
| // +----------------------------------------------------------------------+ // // $Id: test_date_methods_span.php,v 1.2 2005/11/15 00:16:40 pajoye Exp $ // require_once 'Date.php'; require_once 'Date/Span.php'; $date = new Date(); $tmp = new Date($date); printf("Actual date: %s\n", $date->getDate(DATE_FORMAT_ISO)); $tmp->copy($date); $tmp->subtractSpan(new Date_Span('0:00:00:05')); printf("Subtracting 5 seconds: %s\n", $tmp->getDate(DATE_FORMAT_ISO)); $tmp->copy($date); $tmp->subtractSpan(new Date_Span('0:00:20:00')); printf("Subtracting 20 minutes: %s\n", $tmp->getDate(DATE_FORMAT_ISO)); $tmp->copy($date); $tmp->subtractSpan(new Date_Span('0:10:00:00')); printf("Subtracting 10 hours: %s\n", $tmp->getDate(DATE_FORMAT_ISO)); $tmp->copy($date); $tmp->subtractSpan(new Date_Span('3:00:00:00')); printf("Subtracting 3 days: %s\n", $tmp->getDate(DATE_FORMAT_ISO)); $tmp->copy($date); $tmp->subtractSpan(new Date_Span('3:10:20:05')); printf("Subtracting 3 days, 10 hours, 20 minutes and 5 seconds: %s\n", $tmp->getDate(DATE_FORMAT_ISO)); $tmp->copy($date); $tmp->addSpan(new Date_Span('0:00:00:05')); printf("Adding 5 seconds: %s\n", $tmp->getDate(DATE_FORMAT_ISO)); $tmp->copy($date); $tmp->addSpan(new Date_Span('0:00:20:00')); printf("Adding 20 minutes: %s\n", $tmp->getDate(DATE_FORMAT_ISO)); $tmp->copy($date); $tmp->addSpan(new Date_Span('0:10:00:00')); printf("Adding 10 hours: %s\n", $tmp->getDate(DATE_FORMAT_ISO)); $tmp->copy($date); $tmp->addSpan(new Date_Span('3:00:00:00')); printf("Adding 3 days: %s\n", $tmp->getDate(DATE_FORMAT_ISO)); $tmp->copy($date); $tmp->addSpan(new Date_Span('3:10:20:05')); printf("Adding 3 days, 10 hours, 20 minutes and 5 seconds: %s\n", $tmp->getDate(DATE_FORMAT_ISO)); ?>