another…

I need to check within array given(listofSpecialDays) that contains many dates, to check if the month and year exist in the array given…

in PHP:

i... better not write this :) 

for the rubyst

prevm=listOfSpecialDays.detect{|d| d.month == lastmonth.month and d.year == lastmonth.year}

ah.. TC showed! :P

Tags:
PHP, RUBY + RAILS |

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

No comments yet.

Sorry, the comment form is closed at this time.