• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# JsDate类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中JsDate的典型用法代码示例。如果您正苦于以下问题:C# JsDate类的具体用法?C# JsDate怎么用?C# JsDate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



JsDate类属于命名空间,在下文中一共展示了JsDate类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnReady

        static void OnReady()
        {
            var today = new JsDate();
            var birthdays = new JsArray<JsNumber> {
                new JsDate(today.getFullYear(), today.getMonth(), 11).valueOf(),
                new JsDate(today.getFullYear(), today.getMonth() + 1, 6).valueOf(),
                new JsDate(today.getFullYear(), today.getMonth() + 1, 27).valueOf(),
                new JsDate(today.getFullYear(), today.getMonth() - 1, 3).valueOf(),
                new JsDate(today.getFullYear(), today.getMonth() - 2, 22).valueOf()
 
            };
                    new jQuery("#datepicker").kendoDatePicker(new DatePickerConfiguration {
                        value = today,
                        month=  new MonthConfiguration {
                            // template for dates in month view
                            content = "# if ($.inArray(+data.date, [" + birthdays + "]) != -1) { #" +
                                         "<div class='birthday'></div>" +
                                     "# } #" +
                                     "#= data.value #"
                        },
                        footer = "Today - #=kendo.toString(data, 'd') #"
                    });

                    new jQuery("#datepicker").data("kendoDatePicker").As<DatePicker>();
                                    //TODO: .dateView.calendar.element
                                    //.width(300);
                

        }
开发者ID:fjgandrade,项目名称:sharpkit,代码行数:29,代码来源:Template.cs


示例2: GetDate

 private static JsDate GetDate(int? year, int month, int date) 
 {
     var d = new JsDate();
     if (year != null) {
         d.setFullYear(year.Value);
     }
     d.setMonth(month);
     d.setDate(date);
     return d;
 }
开发者ID:x335,项目名称:WootzJs,代码行数:10,代码来源:TimeZone.cs


示例3: endChange

        static void endChange()
        {
            var endDate = DatePickerGlobals.end.value().As<JsDate>();

            if (endDate.As<JsBoolean>())
            {
                endDate = new JsDate(endDate.As<JsString>());
                endDate.setDate(endDate.getDate() + 1);
                DatePickerGlobals.start.min(endDate);
            }
        }
开发者ID:fjgandrade,项目名称:sharpkit,代码行数:11,代码来源:Rangeselection.cs


示例4: startChange

        static void startChange()
        {
            var startDate = DatePickerGlobals.start.value().As<JsDate>();

            if (startDate.As<JsBoolean>())
            {
                startDate = new JsDate(startDate.As<JsString>());
                startDate.setDate(startDate.getDate() + 1);
                DatePickerGlobals.end.min(startDate);
            }
        }
开发者ID:fjgandrade,项目名称:sharpkit,代码行数:11,代码来源:Rangeselection.cs


示例5: DateIsDst

        /// <summary>
        /// Checks whether a given date is in daylight saving time.
        /// If the date supplied is after august, we assume that we're checking
        /// for southern hemisphere DST.
        /// </summary>
        private static bool DateIsDst(JsDate date) 
        {
            var is_southern = date.getMonth() > 7;
            var base_offset = is_southern ? GetJuneOffset(date.getFullYear()) : GetJanuaryOffset(date.getFullYear());
            var date_offset = GetDateOffset(date);
            var is_west = base_offset < 0;
            var dst_offset = base_offset - date_offset;
                  
            if (!is_west && !is_southern) {
                return dst_offset < 0;
            }

            return dst_offset != 0;
        }
开发者ID:x335,项目名称:WootzJs,代码行数:19,代码来源:TimeZone.cs


示例6: update

 /// <summary>
 /// Update the contents of the picker
 /// </summary>
 /// <param name="date"><p>The new date</p>
 /// </param>
 /// <param name="forceRefresh"><p>True to force a full refresh</p>
 /// </param>
 private void update(JsDate date, bool forceRefresh){}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:8,代码来源:Ext.picker.Date.cs


示例7: selectedUpdate

 /// <summary>
 /// Update the selected cell
 /// </summary>
 /// <param name="date"><p>The new date</p>
 /// </param>
 private void selectedUpdate(JsDate date){}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:6,代码来源:Ext.picker.Date.cs


示例8: isLeapYear

 /// <summary>
 /// Checks if the current date falls within a leap year.
 /// </summary>
 /// <param name="date"><p>The date</p>
 /// </param>
 /// <returns>
 /// <span><see cref="bool">Boolean</see></span><div><p>True if the current date falls within a leap year, false otherwise.</p>
 /// </div>
 /// </returns>
 public static bool isLeapYear(JsDate date){return false;}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:10,代码来源:Ext.Date.cs


示例9: isDST

 /// <summary>
 /// Checks if the current date is affected by Daylight Saving Time (DST).
 /// </summary>
 /// <param name="date"><p>The date</p>
 /// </param>
 /// <returns>
 /// <span><see cref="bool">Boolean</see></span><div><p>True if the current date is affected by DST.</p>
 /// </div>
 /// </returns>
 public static bool isDST(JsDate date){return false;}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:10,代码来源:Ext.Date.cs


示例10: getTimezone

 /// <summary>
 /// Get the timezone abbreviation of the current date (equivalent to the format specifier 'T').
 /// Note: The date string returned by the javascript Date object's toString() method varies
 /// between browsers (e.g. FF vs IE) and system region settings (e.g. IE in Asia vs IE in America).
 /// For a given date string e.g. "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)",
 /// getTimezone() first tries to get the timezone abbreviation from between a pair of parentheses
 /// (which may or may not be present), failing which it proceeds to get the timezone abbreviation
 /// from the GMT offset portion of the date string.
 /// </summary>
 /// <param name="date"><p>The date</p>
 /// </param>
 /// <returns>
 /// <span><see cref="String">String</see></span><div><p>The abbreviated timezone name (e.g. 'CST', 'PDT', 'EDT', 'MPST' ...).</p>
 /// </div>
 /// </returns>
 public static JsString getTimezone(JsDate date){return null;}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:16,代码来源:Ext.Date.cs


示例11: getLastDayOfMonth

 /// <summary>
 /// Get the last day of the current month, adjusted for leap year.  The returned value
 /// is the numeric day index within the week (0-6) which can be used in conjunction with
 /// the monthNames array to retrieve the textual day name.
 /// Example:
 /// <code>var dt = new Date('1/10/2007'),
 /// lastDay = <see cref="Ext.Date.getLastDayOfMonth">Ext.Date.getLastDayOfMonth</see>(dt);
 /// console.log(<see cref="Ext.Date.dayNames">Ext.Date.dayNames</see>[lastDay]); //output: 'Wednesday'
 /// </code>
 /// </summary>
 /// <param name="date"><p>The date</p>
 /// </param>
 /// <returns>
 /// <span><see cref="Number">Number</see></span><div><p>The day number (0-6).</p>
 /// </div>
 /// </returns>
 public static JsNumber getLastDayOfMonth(JsDate date){return null;}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:17,代码来源:Ext.Date.cs


示例12: setMinValue

 /// <summary>
 /// Set the minValue and update the list of available times. This must be a Date object (only the time
 /// fields will be used); no parsing of String values will be done.
 /// </summary>
 /// <param name="value">
 /// </param>
 public void setMinValue(JsDate value){}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:7,代码来源:Ext.picker.Time.cs


示例13: setMaxValue

 /// <summary>
 /// Set the maxValue and update the list of available times. This must be a Date object (only the time
 /// fields will be used); no parsing of String values will be done.
 /// </summary>
 /// <param name="value">
 /// </param>
 public void setMaxValue(JsDate value){}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:7,代码来源:Ext.picker.Time.cs


示例14: normalizeDate

 /// <summary>
 /// Sets the year/month/day of the given Date object to the initDate, so that only
 /// the time fields are significant. This makes values suitable for time comparison.
 /// </summary>
 /// <param name="date">
 /// </param>
 private void normalizeDate(JsDate date){}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:7,代码来源:Ext.picker.Time.cs


示例15: getGMTOffset

 /// <summary>
 /// Get the offset from GMT of the current date (equivalent to the format specifier 'O').
 /// </summary>
 /// <param name="date"><p>The date</p>
 /// </param>
 /// <param name="colon"><p>true to separate the hours and minutes with a colon (defaults to false).</p>
 /// </param>
 /// <returns>
 /// <span><see cref="String">String</see></span><div><p>The 4-character offset string prefixed with + or - (e.g. '-0600').</p>
 /// </div>
 /// </returns>
 public static JsString getGMTOffset(JsDate date, object colon=null){return null;}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:12,代码来源:Ext.Date.cs


示例16: getLastDateOfMonth

 /// <summary>
 /// Get the date of the last day of the month in which this date resides.
 /// </summary>
 /// <param name="date"><p>The date</p>
 /// </param>
 /// <returns>
 /// <span><see cref="Date">Date</see></span><div>
 /// </div>
 /// </returns>
 public static JsDate getLastDateOfMonth(JsDate date){return null;}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:10,代码来源:Ext.Date.cs


示例17: add

 /// <summary>
 /// Provides a convenient method for performing basic date arithmetic. This method
 /// does not modify the Date instance being called - it creates and returns
 /// a new Date instance containing the resulting date value.
 /// Examples:
 /// <code>// Basic usage:
 /// var dt = <see cref="Ext.Date.add">Ext.Date.add</see>(new Date('10/29/2006'), <see cref="Ext.Date.DAY">Ext.Date.DAY</see>, 5);
 /// console.log(dt); //returns 'Fri Nov 03 2006 00:00:00'
 /// // Negative values will be subtracted:
 /// var dt2 = <see cref="Ext.Date.add">Ext.Date.add</see>(new Date('10/1/2006'), <see cref="Ext.Date.DAY">Ext.Date.DAY</see>, -5);
 /// console.log(dt2); //returns 'Tue Sep 26 2006 00:00:00'
 /// </code>
 /// </summary>
 /// <param name="date"><p>The date to modify</p>
 /// </param>
 /// <param name="interval"><p>A valid date interval enum value.</p>
 /// </param>
 /// <param name="value"><p>The amount to add to the current date.</p>
 /// </param>
 /// <returns>
 /// <span><see cref="Date">Date</see></span><div><p>The new Date instance.</p>
 /// </div>
 /// </returns>
 public static JsDate add(JsDate date, JsString interval, JsNumber value){return null;}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:24,代码来源:Ext.Date.cs


示例18: getSuffix

 /// <summary>
 /// Get the English ordinal suffix of the current day (equivalent to the format specifier 'S').
 /// </summary>
 /// <param name="date"><p>The date</p>
 /// </param>
 /// <returns>
 /// <span><see cref="String">String</see></span><div><p>'st, 'nd', 'rd' or 'th'.</p>
 /// </div>
 /// </returns>
 public static JsString getSuffix(JsDate date){return null;}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:10,代码来源:Ext.Date.cs


示例19: between

 /// <summary>
 /// Checks if a date falls on or between the given start and end dates.
 /// </summary>
 /// <param name="date"><p>The date to check</p>
 /// </param>
 /// <param name="start"><p>Start date</p>
 /// </param>
 /// <param name="end"><p>End date</p>
 /// </param>
 /// <returns>
 /// <span><see cref="bool">Boolean</see></span><div><p>true if this date falls on or between the given start and end dates.</p>
 /// </div>
 /// </returns>
 public static bool between(JsDate date, JsDate start, JsDate end){return false;}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:14,代码来源:Ext.Date.cs


示例20: getWeekOfYear

 /// <summary>
 /// Get the numeric ISO-8601 week number of the year.
 /// (equivalent to the format specifier 'W', but without a leading zero).
 /// </summary>
 /// <param name="date"><p>The date</p>
 /// </param>
 /// <returns>
 /// <span><see cref="Number">Number</see></span><div><p>1 to 53</p>
 /// </div>
 /// </returns>
 public static JsNumber getWeekOfYear(JsDate date){return null;}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:11,代码来源:Ext.Date.cs



注:本文中的JsDate类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# JsDictionaryObject类代码示例发布时间:2022-05-24
下一篇:
C# JsAstNode类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap