w10schools
Login Register
  • Home
  • Tutorials
    • HTML, CSS
      • HTML, HTML5
      • CSS, CSS3
    • XML
    • JavaScript, AJAX
    • PHP
    • Ruby on Rails
      • Ruby
      • Rails
    • ASP.NET
      • ASP
      • C# .NET
    • Java
      • JSP
    • Databases
      • MySQL
      • MSSQL Server
      • Oracle
    • Web Server
      • Windows
      • Linux
      • Apache
      • IIS
    • Design
      • Dreamweaver
      • Flash
      • Photoshop
      • Fireworks
      • CorelDRAW
      • Illustrator
  • References
    • HTML
      • Bootstrap
    • CSS
      • CSS Selectors
      • Sass
    • JavaScript
    • Mobile Apps
      • Cordova
    • Ruby on Rails
      • Ruby
      • Rails
    • PHP
      • Function
      • Language
      • CodeIgniter
      • Phalcon
      • PHPUnit
      • Symfony
      • Drupal
      • Yii
      • Laravel
    • Perl
      • Perl
    • Python
      • Python
      • Django
      • NumPy
      • Pandas
      • scikit-image
      • scikit-learn
      • Statsmodels
      • Matplotlib
    • Lua
      • Lua
    • C, C++
      • C
      • C++
    • Server
      • Docker
      • Apache HTTP Server
      • Nginx
    • Database
      • PostgreSQL
    • Big Data
      • TensorFlow
    • Game Development
      • Phaser
      • LÖVE
  • Articles
    • News
    • General
      • Website Promotion
      • Online Advertising
      • Make Money Online
    • Editorials
    • Interviews
    • Web Roundups
  • Resources
    • Design
      • Fonts
      • Graphics
      • Vectors
      • Templates
      • UI (User Interface)
      • Brushes
      • Patterns, Backgrounds
      • Textures
    • Web Development
      • HTML, CSS
      • XML
      • JavaScript, AJAX
      • Ruby on Rails
      • PHP
      • Java
      • .NET
      • Python
      • Perl
      • Flash
    • Mobile Application Development
      • Mobile Development Tools
      • Swift
    • Online Services
      • Online Storage
      • Web Hosting
  • Tools
    • Generators
  • Bulletin
  • Posts
doc_ruby_on_rails
doc_ruby_on_rails


to_time

to_time() Instance Public methods Return a Time object of the date/time which represents self. If the @year is below 1970, this method returns nil, because Time cannot handle years below 1970. The timezone used is GMT.

to_date

to_date() Instance Public methods Return a Date object of the date which represents self. The Date object do not contain the time component (only date).

to_a

to_a() Instance Public methods Returns all date/time components in an array. Returns +[year, month, day, hour, min, sec]+.

sec=

sec=(value) Instance Public methods Set value as the new date/time component. Raises an ArgumentError if the given value isn't between 0 and 59.

month=

month=(value) Instance Public methods Set value as the new date/time component. Raises an ArgumentError if the given value isn't between 1 and 12. mon=

mon=

mon=(value) Instance Public methods Alias for #month=. month=

min=

min=(value) Instance Public methods Set value as the new date/time component. Raises an ArgumentError if the given value isn't between 0 and 59.

hour=

hour=(value) Instance Public methods Set value as the new date/time component. Raises an ArgumentError if the given value isn't between 0 and 24.

day=

day=(value) Instance Public methods Set value as the new date/time component. Raises an ArgumentError if the given value isn't between 1 and 31.

==

==(o) Instance Public methods Returns whether or not all date/time components are an array.

Page 422 of 2275

|< < Prev 419 420 421 422 423 424 425 Next > >|
  • Facebook
  • Tweet
  • Digg it
  • Stumbleupon
  • Delicious
  • Plus Share

Designed by : w10schools

service@w10schools.com

Our Partners: aeeble – Providing content publishing and search solutions