I am currently working to create a formal document in iReport 5.50. At the very end, there should be a line like the following: "(...) This document has been extended to two thousand fourteen thousand on July 7".
The part "The seventh part of July of the fourteen fourteen" is the present day. I want to know that the current words are a way to appear as if the document is needed so far, how do I get the name of the week and the name of the month ...
Any help Much appreciated!
Although what you want is related to dates, this is a very common problem.
What do you want, which is a classic programming drill.
Here are some examples of PHP code (I have set some issues in the original):
function numToOrdinalWord ($ num) {$ first_word = array ('et', 'First', 'Seconds', 'Third', 'Fourth', 'Fifth', 'Sixth', 'Seventh', 'Eighth', 'Ninth', 'Tenth', 'Eleventh', 'Twelfth', 'XII' ',' Fourteenth ',' fifteenth ',' sixteenth ',' seventh, '' eighteen '', 'Nitin', 'twentieth'); $ Second_word = array ('', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety'); If ($ num & lt; = 20) returns ($ num == 0)? 'Zaroth': $ first_word [$ num]; $ First_num = substr ($ num, -1, 1); $ Second_num = substr ($ num, -2, 1); Return $ string = str_replace ('y-eth', 'ieth', $ second_word [$ second_num]. '-'. $ First_word [$ first_num]); }
|
Comments
Post a Comment