Solved

What does this code snippet value represent?

Posted on 2011-02-15
2
346 Views
Last Modified: 2012-08-14
I have this code snippet:

                    $today = date('Ymd');
                    $dateCompare = date('Y') . '0507';
                    if ($today < $dateCompare) {

And I want to know what does the 0507 represent? Is it a date format or something? It looks like it is comparing the Year to 0507...but I don't understand it.

Any help would be appreciated.
0
Comment
Question by:Donnie Walker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
jfromanski earned 500 total points
ID: 34897528
$today is Ymd, eg. 20110215
$dateCompare is concatenation of two strings: Y and '0507' - this will give eg. 20110507
0
 

Author Closing Comment

by:Donnie Walker
ID: 34897559
Thank you sir!
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
The viewer will learn how to dynamically set the form action using jQuery.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question