Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Date



  Date interval add and sub prior to PHP 5.3

After PHP 5.3, we can use DateInterval object or date_interval_create_from_date_string() function to add or subtract days,weeks,months or years to or from a DateObject.But prior to PHP 5.3,we cannot do this. If we want to achieve the same effect. We need to use some skills. Here is one:We can use strtotime() function to achieve this. For example:$date=date('Y-m-d',time());$datestamp=strtotime(date('Y-m-d',strtotime($date)).' +1 day'); $datestamp=strtotime(date('Y-m-d',strtotime($date)).' +1...

   PHP,DateInterval,Class,PHP 5.3,PHP 5.2     2011-10-21 10:50:10

  Convert time to Unix time

Unix time is defined as the number of seconds that have elapsed since midnight Coordinated Universal Time (UTC), 1 January 1970,not counting leap seconds. It is used widely in Unix-like and many other operating systems and file formats. It is neither a linear representation of time nor a true representation of UTC. Unix time may be checked on some Unix systems by typing date +%s on the command line. Sometimes it's a bit difficult to compare times stored in different applications or systems with ...

   UNIX time, Oracle DATE, conversion, timestamp     2013-01-19 09:04:17

  The confusing strtotime() function in PHP

Frequently PHP programmers get confused of the use of i month, -1 month, next month in strtotime() function. and hence it leaves some impression to programmer that this function is not that reliable. Let's take one example of strtotime call with -1 month and see why it leaves this impression. date("Y-m-d",strtotime("-1 month"))  // Assume today is 2018-07-31 What's the output of above call? The answer is 2018-07-01. Why not 2018-06-30? So people get confused. It appears that this is ...

   PHP,STRTOTIME,FIRST DAY OF,-1 MONTH     2018-08-04 05:49:32

  Windows 8.1 will be released on October 18

According to TheVerge, Microsoft Windows 8.1 will be released on October 18. Windows 8 users can download the free update on Windows Store one day before the release date, There will be a formal release press on October 18. In next few weeks, Windows 8 RTM will be open to PC manufacturers and partners. In this year's WPC, Microsoft demonstrated their latest Windows 8.1 on various devices most of the time, including the 8-inch Tablet PC, laptops, desktops and even streamed content from PC to Xbo...

   Windows 8.1,Release date     2013-08-14 11:49:09

  Update parent window after closing the window opened by window.open()

Imagine we have a webpage which has a text field to let user enter a date. Usually, we may create a calendar window to ask the user to pick one date from the calendar window, when the date is picked, the calendar window will close and the date picked will be put into the text field. This way involves the window.open() method in JavaScript, and we may think how the opened window knows its parent window and then updates the parent window. I give a simple demo on this.We have two pages, on is the p...

   window.open, JavaScript,update, return value     2012-06-23 01:36:32

  How To Make Sure Your Next Date Isn’t A Psychopath Via Online Checks

Online dating is pretty much the norm these days when it comes to looking for love, but it can't be denied there’s still a bit of a stigma attached and most certainly an air of mystery. After all, until you meet face-to-face there’s no real way of knowing who they are. It’s putting your faith in a stranger and, of course, that’s more often than not absolutely fine. Over the years though there have been a number of horror stories and it’s enough to put even the most...

   PROMOTION,DATE     2019-06-12 10:44:11

  A simple example of git bisect command

git bisect is a very powerful command for finding out which commit is a bad commit when bug occurs.  The rationale behind this command is that it pin locates the bad commit by divide and conquer. It divides the commit history into two equal parts, then determines whether the bad commit is at the first half or at the other half. This process will continue until the bad commit is located. Here is a really good example created by bradleyboy, this is a simple git repository which demonstr...

   GITHUB,GIT,GIT BISECT     2019-07-12 10:31:51

  How long does the heuristic cache of the browser actually cache?

Heuristic cache Heuristic caching is the default behavior of browser caching (i.e., for responses without Cache-Control), which is not simply "not caching", but implicitly caching based on the so-called "heuristic cache". HTTP is designed to cache as much as possible, so even if Cache-Control is not specified, the response will be stored and reused if certain conditions are met. This is called heuristic caching. HTTP/1.1 200 OK Content-Type: text/html Content-Length: 1024 Date: Tue, 22 Feb 2022 ...

   HEURISTIC CACHE,WEB DESIGN     2023-05-26 08:40:13

  Windows 8 will be on sale on 26th October

Microsoft announced that they would start to sell Windows 8 on 26th October. Earlier this month at the Microsoft Worldwide Partner Conference, Microsoft promised that they would release Windows 8 in this October.Steven Sinofsky, Windows department manager, announced this news in Microsoft's yearly sales conference. He mentioned that the next generation Windows operating system would be on sale on the Friday 3 months later. But he didn't mention whether Surface would be released at the same time....

   Windows 8, Release date, Sale date,Surface     2012-07-19 10:38:51

  Data type in MySQL

For both small free database space and large e-commerce websites, reasonable database table structure design is essential. To achieve this, it requires us to have a full understanding of commonly used data types in database system. Below we share some knowledge about data types in MySQL.1. Numeric typesThe numeric types can be classified as : integer, float and decimal type.The so-called "decimal" refers DECIMAL and NUMERIC, they are of the same type. Strictly speaking it is not a numeric type, ...

   MySQL, Data type,VARCHAR     2013-01-01 10:56:06