当前位置: 首页>>代码示例>>PHP>>正文


PHP Date::GetDate方法代码示例

本文整理汇总了PHP中Date::GetDate方法的典型用法代码示例。如果您正苦于以下问题:PHP Date::GetDate方法的具体用法?PHP Date::GetDate怎么用?PHP Date::GetDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Date的用法示例。


在下文中一共展示了Date::GetDate方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Dates

 /**
  * @return array[int]Date
  */
 public function Dates()
 {
     $current = $this->_begin->GetDate();
     $end = $this->_end->GetDate();
     $dates = array($current);
     for ($day = 0; $current->Compare($end) < 0; $day++) {
         $current = $current->AddDays(1);
         $dates[] = $current;
     }
     return $dates;
 }
开发者ID:hugutux,项目名称:booked,代码行数:14,代码来源:DateRange.php

示例2: Dates

 /**
  * @return Date[]
  */
 public function Dates()
 {
     $current = $this->_begin->GetDate();
     if ($this->_end->IsMidnight()) {
         $end = $this->_end->AddDays(-1)->GetDate();
     } else {
         $end = $this->_end->GetDate();
     }
     $dates = array($current);
     for ($day = 0; $current->Compare($end) < 0; $day++) {
         $current = $current->AddDays(1);
         $dates[] = $current;
     }
     return $dates;
 }
开发者ID:Trideon,项目名称:gigolo,代码行数:18,代码来源:DateRange.php

示例3: Date

         $sess_date = $date->GetNowFull();
         $sess_ip = "";
         $sess_user_id = "";
     } else {
         $message = "Problemas na operação.";
     }
 }
 if ($action == 3) {
     $date = new Date();
     $date->SetConverted($sess_date);
     $date->ConvertToFullDate();
     $session = new Session();
     $session->SetDatabase($database);
     $session->SetId($sess_id);
     $session->SetActive($sess_active);
     $session->SetName($date->GetDate());
     $session->SetIp($sess_ip);
     $session->SetUser($sess_user_id);
     if ($session->Update()) {
         $message = $screen_module_name . " alterado com sucesso.";
     } else {
         $message = "Problemas na operação.";
     }
 }
 if ($action == 4) {
     $session = new Session();
     $session->SetDatabase($database);
     $session->SetId($sess_id);
     if ($session->Delete()) {
         $date = new Date();
         $message = $screen_module_name . " excluído com sucesso.";
开发者ID:googlecode-mirror,项目名称:schifers,代码行数:31,代码来源:pgSession.php

示例4: Date

         }
     }
 }
 if ($action == 3) {
     $date = new Date();
     $date->SetConverted($para_date);
     $date->ConvertToFullDate();
     if ($date->VerifyDate()) {
         $message = $date->GetMessage();
         $message_position = 2;
     } else {
         $paragraph = new Paragraph();
         $paragraph->SetDatabase($database);
         $paragraph->SetId($para_id);
         $paragraph->SetText(str_replace("\"", "\\\"", $para_text));
         $paragraph->SetDate($date->GetDate());
         $paragraph->SetOrder($para_order);
         $paragraph->SetUser($para_user_id);
         $paragraph->SetPage($para_page_id);
         if ($paragraph->Update()) {
             $message_position = 6;
             $message = $screen_module_name . " alterado com sucesso.";
         } else {
             $message_position = 6;
             $message = "Problemas na operação.";
         }
     }
 }
 if ($action == 4) {
     $paragraph = new Paragraph();
     $paragraph->SetDatabase($database);
开发者ID:googlecode-mirror,项目名称:schifers,代码行数:31,代码来源:pgParagraph.php

示例5: Date

         }
     }
 }
 if ($action == 3) {
     $date = new Date();
     $date->SetDate($mess_date);
     $date->ConverToFullDate();
     if ($date->VerifyDate()) {
         $message = $date->GetMessage();
         $message_position = 2;
     } else {
         $message = new Message();
         $message->SetDatabase($database);
         $message->SetId($mess_id);
         $message->SetText(str_replace("\"", "\\\"", $mess_text));
         $message->SetDate($date->GetDate());
         $message->SetUser($mess_user_id);
         $message->SetTopic($mess_topc_id);
         if ($message->Update()) {
             $message_position = 6;
             $message = $screen_module_name . " alterado com sucesso.";
         } else {
             $message_position = 6;
             $message = "Problemas na operação.";
         }
     }
 }
 if ($action == 4) {
     $message = new Message();
     $message->SetDatabase($database);
     $message->SetId($mess_id);
开发者ID:googlecode-mirror,项目名称:schifers,代码行数:31,代码来源:pgMessage.php

示例6: Date

         $shou_id = "";
         $shou_date = $date->GetNowFull();
         $shou_text = "";
         $shou_user_id = "";
     } else {
         $message = "Problemas na operação.";
     }
 }
 if ($action == 3) {
     $date = new Date();
     $date->SetConverted($shou_date);
     $date->ConvertToFullDate();
     $shout = new Shout();
     $shout->SetDatabase($database);
     $shout->SetId($shou_id);
     $shout->SetDate($date->GetDate());
     $shout->SetText($shou_text);
     $shout->SetUser($shou_user_id);
     $shou_id = $shout->GetId();
     $shou_date = $shout->GetConverted();
     $shou_text = $shout->GetText();
     $shou_user_id = $shout->GetUser();
     if ($shout->Update()) {
         $message = $screen_module_name . " alterado com sucesso.";
     } else {
         $message = "Problemas na operação.";
     }
 }
 if ($action == 4) {
     $shout = new Shout();
     $shout->SetDatabase($database);
开发者ID:googlecode-mirror,项目名称:schifers,代码行数:31,代码来源:pgShout.php

示例7: FirstDay

 /**
  * @return Date
  */
 public function FirstDay()
 {
     return $this->date->GetDate();
 }
开发者ID:hugutux,项目名称:booked,代码行数:7,代码来源:CalendarDay.php

示例8: Date

         $news_date = $date->GetNowFull();
         $news_text = "";
         $news_user_id = "";
     } else {
         $message = "Problemas na operação.";
     }
 }
 if ($action == 3) {
     $date = new Date();
     $date->SetConverted($news_date);
     $date->ConvertToFullDate();
     $news = new News();
     $news->SetDatabase($database);
     $news->SetId($news_id);
     $news->SetTitle($news_title);
     $news->SetDate($date->GetDate());
     $news->SetText($news_text);
     $news->SetUser($news_user_id);
     $news_id = $news->GetId();
     $news_title = $news->GetTitle();
     $news_date = $news->GetDate();
     $news_text = $news->GetText();
     $news_user_id = $news->GetUser();
     if ($news->Update()) {
         $message = $screen_module_name . " alterada com sucesso.";
     } else {
         $message = "Problemas na operação.";
     }
 }
 if ($action == 4) {
     $date = new Date();
开发者ID:googlecode-mirror,项目名称:schifers,代码行数:31,代码来源:pgNew.php

示例9: IsDateReservable

 public function IsDateReservable(Date $date)
 {
     return !$date->GetDate()->LessThan(Date::Now()->GetDate());
 }
开发者ID:hugutux,项目名称:booked,代码行数:4,代码来源:DailyLayout.php

示例10: Date

         }
     }
 }
 if ($action == 3) {
     $date = new Date();
     $date->SetConverted($page_date);
     $date->ConvertToFullDate();
     if ($date->VerifyDate()) {
         $message = $date->GetMessage();
         $message_position = 2;
     } else {
         $page = new Page();
         $page->SetDatabase($database);
         $page->SetId($page_id);
         $page->SetNumber($page_number);
         $page->SetDate($date->GetDate());
         $page->SetUser($page_user_id);
         $page->SetArticle($page_arti_id);
         if ($page->Update()) {
             $message_position = 5;
             $message = $screen_module_name . " alterada com sucesso.";
         } else {
             $message_position = 5;
             $message = "Problemas na operação.";
         }
     }
 }
 if ($action == 4) {
     $page = new Page();
     $page->SetDatabase($database);
     $page->SetId($page_id);
开发者ID:googlecode-mirror,项目名称:schifers,代码行数:31,代码来源:pgPage.php

示例11: GetDateReturnsDateAsOfMidnight

 public function GetDateReturnsDateAsOfMidnight()
 {
     $date = new Date('2009-10-10 10:10:10');
     $onlyDate = $date->GetDate();
     $this->assertEquals(0, $onlyDate->Hour());
     $this->assertEquals(0, $onlyDate->Minute());
     $this->assertEquals(0, $onlyDate->Second());
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:8,代码来源:DateTests.php

示例12: Date

         }
     }
 }
 if ($action == 3) {
     $date = new Date();
     $date->SetDate($arti_date);
     $date->ConvertToDate();
     if ($date->VerifyDate()) {
         $message = $date->GetMessage();
         $message_position = 2;
     } else {
         $article = new Article();
         $article->SetDatabase($database);
         $article->SetId($arti_id);
         $article->SetTitle($arti_title);
         $article->SetDate($date->GetDate());
         $article->SetUser($arti_user_id);
         $article->SetSubject($arti_subj_id);
         if ($article->Update()) {
             $message_position = 5;
             $message = $screen_module_name . " alterado com sucesso.";
         } else {
             $message_position = 5;
             $message = "Problemas na operação.";
         }
     }
 }
 if ($action == 4) {
     $article = new Article();
     $article->SetDatabase($database);
     $article->SetId($arti_id);
开发者ID:googlecode-mirror,项目名称:schifers,代码行数:31,代码来源:pgArticle.php

示例13: Date

     }
 }
 if ($action == 3) {
     $date = new Date();
     $date->SetConverted($topc_date);
     $date->ConvertToDate();
     if ($date->VerifyDate()) {
         $message = $date->GetMessage();
         $message_position = 2;
     } else {
         $topic = new Topic();
         $topic->SetDatabase($database);
         $topic->SetId($topc_id);
         $topic->SetTitle(str_replace("\"", "\\\"", $topc_title));
         $topic->SetText(str_replace("\"", "\\\"", $topc_text));
         $topic->SetDate($date->GetDate());
         $topic->SetLevel($topc_level);
         $topic->SetUser($topc_user_id);
         $topic->SetTopic($topc_topc_id);
         if ($topic->Update()) {
             $message_position = 7;
             $message = $screen_module_name . " alterado com sucesso.";
         } else {
             $message_position = 7;
             $message = "Problemas na operação.";
         }
     }
 }
 if ($action == 4) {
     $topic = new Topic();
     $topic->SetDatabase($database);
开发者ID:googlecode-mirror,项目名称:schifers,代码行数:31,代码来源:pgTopic.php


注:本文中的Date::GetDate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。