Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9161065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:53:03+00:00 2026-06-17T13:53:03+00:00

Ok I have some code, gleaned from the internet. So this is the case

  • 0

Ok I have some code, gleaned from the internet. So this is the case and what I am trying to acheive.

Ok Page, user enters Birthday ( not Birthdate ) So we have the data in format dd/mm saved to database, example: 30/07 to represent 30 July )

So next page user goes to , I want to format the date correctly to match what I am trying to acheieve, add corresponding ordinal ( but remove the – between dd and mm ) and not echo the yy because we never got that information in the first place.

Essentially, if when user hits this page, we know the dd and mm , I am happy to add current year as the yy ( but not to fetch yy from the db ) but instead supply it adhoc.

The script below, is from internet and takes into account leap years, but need help. I cannot just remove the year, as this gives false results ( presumably because of strtotime function )But when user added their Birthday , we did not grab the year, because we do not need it.

Code:

<?php
function getStarSign($date="")
{
$zodiac[356] = "Capricorn";
$zodiac[326] = "Sagittarius";
$zodiac[296] = "Scorpio";
$zodiac[266] = "Libra";
$zodiac[235] = "Virgo";
$zodiac[203] = "Leo";
$zodiac[172] = "Cancer";
$zodiac[140] = "Gemini";
$zodiac[111] = "Taurus";
$zodiac[78]  = "Aries";
$zodiac[51]  = "Pisces";
$zodiac[20]  = "Aquarius";
$zodiac[0]   = "Capricorn";
if (!$date) $date = time();
$dayOfTheYear = date("z",$date);
$isLeapYear = date("L",$date);
if ($isLeapYear && ($dayOfTheYear > 59)) $dayOfTheYear = $dayOfTheYear - 1;
foreach($zodiac as $day => $sign) if ($dayOfTheYear > $day) break;
return $sign;
}
$myBday = "2013-07-30"; // this needs to be in English Australian format not American English format but do not need year
$AuEnBday = date("dS-F-Y", strtotime($myBday)); // this switches the date from USA to AU date format but do not need year
?>

The above echoes:Leo 30th-July-2013

I want to echo : Leo 30th July ( the year bit can be a var on page somehow but NOT from db )

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:53:05+00:00Added an answer on June 17, 2026 at 1:53 pm
    // One more time!
    $myBday = date("Y") . "-07-30"; // 2013-07-30
    
    // Two digit year
    $myBday2 = date("y") . "-07-30"; // 13-07-30
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some code that compiles, but won't link. I'm not sure why this
I have some code like this from Tkinter import * master = Tk() def
I have some code that I am debugging that uses this operator and I'm
I have some code, which grabs information from a database, then creates a path
I have some code like this: var A = function(a,b,c) { var self =
I have some code that i can insert into my Joomla 3.0 page that
I have some code that looks like this: <div class=container> <aside class=sidebar> <a href=index.php?Cat=members><h3>Members</h3></a>
I have some code like this. $counter = 1; $content = ; foreach($images as
I have some code like this to take over the space bar's function: $(document).keypress(function
I have some code that looks like this: actualColor = 0; targetColors = [NSArray

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.