Example
#{example}"); ipb.editor_values.get('templates')['togglesource'] = new Template(""); ipb.editor_values.get('templates')['toolbar'] = new Template(""); ipb.editor_values.get('templates')['button'] = new Template("
Emoticons
"); // Add smilies into the mix ipb.editor_values.set( 'show_emoticon_link', false ); ipb.editor_values.set( 'bbcodes', $H({"snapback":{"id":"1","title":"Post Snap Back","desc":"This tag displays a little linked image which links back to a post - used when quoting posts from the board. Opens in same window by default.","tag":"snapback","useoption":"0","example":"[snapback]100[/snapback]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"topic":{"id":"5","title":"Topic Link","desc":"This tag provides an easy way to link to a topic","tag":"topic","useoption":"1","example":"[topic=1]Click me![/topic]","switch_option":"0","menu_option_text":"Enter the topic ID","menu_content_text":"Enter the title for this link","single_tag":"0","optional_option":"0","image":""},"post":{"id":"6","title":"Post Link","desc":"This tag provides an easy way to link to a post.","tag":"post","useoption":"1","example":"[post=1]Click me![/post]","switch_option":"0","menu_option_text":"Enter the Post ID","menu_content_text":"Enter the title for this link","single_tag":"0","optional_option":"0","image":""},"spoiler":{"id":"7","title":"Spoiler","desc":"Spoiler tag","tag":"spoiler","useoption":"0","example":"[spoiler]Some hidden text[/spoiler]","switch_option":"0","menu_option_text":"","menu_content_text":"Enter the text to be masked","single_tag":"0","optional_option":"0","image":""},"acronym":{"id":"8","title":"Acronym","desc":"Allows you to make an acronym that will display a description when moused over","tag":"acronym","useoption":"1","example":"[acronym='Laugh Out Loud']lol[/acronym]","switch_option":"0","menu_option_text":"Enter the description for this acronym (EG: Laugh Out Loud)","menu_content_text":"Enter the acronym (EG: lol)","single_tag":"0","optional_option":"0","image":""},"hr":{"id":"12","title":"Horizontal Rule","desc":"Adds a horizontal rule to separate text","tag":"hr","useoption":"0","example":"[hr]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"1","optional_option":"0","image":""},"php":{"id":"14","title":"PHP Code","desc":"Allows you to enter PHP code into a formatted/highlighted syntax box","tag":"php","useoption":"0","example":"[php]$variable = true;\n\nprint_r($variable);[/php]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"html":{"id":"15","title":"HTML Code","desc":"Allows you to enter formatted/syntax-highlighted HTML code","tag":"html","useoption":"0","example":"[html]\n \n[/html]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"sql":{"id":"16","title":"SQL Code","desc":"Allows you to enter formatted/syntax-highlighted SQL code","tag":"sql","useoption":"0","example":"[sql]SELECT p.*, t.* FROM posts p LEFT JOIN topics t ON t.tid=p.topic_id WHERE t.tid=7[/sql]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"xml":{"id":"17","title":"XML Code","desc":"Allows you to enter formatted/syntax-highlighted XML code","tag":"xml","useoption":"0","example":"[xml]3 Replies - 29 Views - Last Post: Today, 06:42 AM
#1
Reputation: 2
- Posts: 34
- Joined: 10-August 11
Posted Today, 05:53 AM
Hello, I am writing some code where i want user to enter the date in format(dd/mm/yyyy). how can i cross check if user has entered the date in correct format?second question, how can i split the date and store it in different variables?
Example:
let say user entered 26/05/2013
values should be stored like this in different variables
int dd = 26
int mm = 05
int yyyy = 2013
Thank you
Is This A Good Question/Topic? 0
Replies To: how to format and split date?
#2
Reputation: 1097
- Posts: 3,425
- Joined: 12-December 12
Re: how to format and split date?
Posted Today, 06:15 AM
Quote
So presumably you have some code to show us? What have you attempted so far? Otherwise it seems that you are just asking someone to provide the entire solution for you.
#3
Reputation: 2
- Posts: 34
- Joined: 10-August 11
Re: how to format and split date?
Posted Today, 06:28 AM
DateFormat format = new SimpleDateFormat("dd-MM-yyyy"); format.parse(date1); System.out.println("Date " + date1 + " is not valid according to " + ((SimpleDateFormat) format).toPattern() + " pattern.");
the above code always throws an exception "not valid according to the format", whatever be the date. i need the tip/hint for the second question not the entire code />
This post has been edited by NDragger: Today, 06:29 AM
#4
Reputation: 1097
- Posts: 3,425
- Joined: 12-December 12
Re: how to format and split date?
Posted Today, 06:42 AM
The date format "dd-MM-yyyy" is not the same as the date format given in your first post.Does it throw an exception, or does it just display the message that you have told it to display?
This line:
format.parse(date1);
does nothing as you do not assign the result to anything.
This post has been edited by andrewsw: Today, 06:42 AM
Page 1 of 1
Source: http://www.dreamincode.net/forums/topic/321843-how-to-format-and-split-date/
60 minutes go daddy Tom Kenny Long Island Medium Alfonso Ribeiro adam sandler College Football Scoreboard
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন