JS Wed Jul 00:00:00 gmt+0800 converted to 2015-07-15

Source: Internet
Author: User

functionstrlen (str) {varLen = 0;  for(vari = 0; i < str.length; i++) {                varc =str.charcodeat (i); //single byte plus 1                if((c >= 0x0001 && C <= 0x007e) | | (0xff60 <= c && C <= 0xff9f) ) {len++; }                Else{len+ = 2; }            }            returnLen; }        functionTodate (num) {//Fri Oct 18:00:00 utc+0800 Wed Jul 00:00:00 gmt+0800num = num + ""; varDate = ""; varmonth =NewArray (); month["Jan"] = 1; month["Feb"] = 2; month["Mar"] = 3; month["APR"] = 4; Month["may"] = 5; month["Jan"] = 6; month["Jul"] = 7; Month[""] = 8; month["SEP"] = 9; month["Oct"] = 10; month["Nov"] = 11; month["Dec"] = 12; varWeek =NewArray (); week["Mon"] = "one"; week["Tue"] = "two"; week["Wed"] = "three"; week["Thu"] = "four"; week["Fri"] = "five"; week["Sat"] = "six"; Week["Sun"] = "Day"; STR= Num.split (""); Date= Str[3] + "-"; varCount = strlen (month[str[1]]); varm = month[str[1]]; if(count = 1) {m= "0" + month[str[1]]; } Date= date + M + "-" + str[2]; returndate; }
Method ToDate (parameter)  

JS Wed Jul 00:00:00 gmt+0800 converted to 2015-07-15

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.