Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   grr Last Bred (http://www.mysidiaadoptables.com/forum/showthread.php?t=2284)

SilverDragonTears 08-09-2011 09:33 PM

grr Last Bred
 
is printing out weird numbers. how can i get it to show the date? I'm getting super annoyed =(

SilverDragonTears 08-10-2011 02:51 PM

This is going to make me lose my mind =(

Chibi_Chicken 08-10-2011 04:58 PM

It looks like the last bred just stores the return value of time()
http://php.net/manual/en/function.time.php (for more info)

you could echo out the date with the date function, like:
date('Y-m-d', $lastweek) to see what it is.

beyond that I am not sure, I haven't work with the time() or the breeding script that much.

SilverDragonTears 08-10-2011 05:11 PM

where do i put that?

SilverDragonTears 08-10-2011 05:17 PM

ok I put it like this
PHP Code:

Last bred".date('Y-m-d', $lastweek)." 

and got
Last bred: 1969-12-31

Chibi_Chicken 08-10-2011 05:47 PM

well that is a long time ago. so what are you trying to do with the last bred just display it as a date?

SilverDragonTears 08-10-2011 05:49 PM

Yes I want it displayed so that the members know when they last bred each pet. And if they haven't been bred yet, display nothing. That's not the hard part though... the hard part is getting it to display the date they were bred.

Chibi_Chicken 08-10-2011 06:24 PM

ok, so i understand the problem more now.

so when you get last bred from the adopt it displays
1969-12-31

i would get the adoptable last bred and then display
PHP Code:

echo date('Y-m-d'$lastbred);
echo 
date('Y-m-d'time()); 

See what the difference is, I dont know why it is giving 1969. Sorry I used $lastweek that is a misleading variable.

SilverDragonTears 08-10-2011 07:14 PM

neat... it gives me
Last bred: 2011-08-10
2011-08-10;

So I guess I can remove one?

SilverDragonTears 08-10-2011 07:19 PM

hmmm i'm confused... this is my code.

PHP Code:

if($lastbred == '') {
    
$article_content .= '';
} else {
    
$article_content .= 'Last bred: '.date('Y-m-d'$lastbred).'<br>
           '
.date('Y-m-d'time()). '<br>';



some caught eggs are showing
Last bred: 1969-12-31
2011-08-10
but the rest print nothing including laid eggs which is how it's suppose to be

oh i see why... some say nothing for last bred and some say 0. how can i fix that?

and a pet i bred today shows

Last bred: 2011-08-10
2011-08-10


All times are GMT -5. The time now is 01:19 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.