search for: today

Displaying 20 results from an estimated 20307 matches for "today".

2008 Nov 19
3
Mock today
In some of my unit tests, I find the need to set today to a different value than the actual today. For example, to test the model method "balance_of_today", which takes no argument, I want to have Date.today be a specific date for the purpose of testing. In other words, I want to do something like this: mock_today(Date.new(2008, 2, 1)) do...
2008 Jan 24
2
Meridian case
Hi there, I have a *really* weird issue with rspec on rails: Given a time meridian formatted using %p When I run `rake spec` the time meridian is converted to lower case: expected: "Today 08:00 PM", got: "Today 08:00 pm" Yet when I run `rake spec:models` and `spec -cfs app/models` the specs pass, ie the the time meridian is in upper case. Anyone got any ideas how I can troubleshoot this one ? I''m using rails 1.2.3, ruby 1.8.6, i686-darwin8.10.1,...
2006 Aug 11
4
date (age) validation
I have an application that requires users to be in a specific age group, or above a certain age. For simplicity sake lets say they have to be at least 18. This is my most recent attempt to produce the desired result: validates_exclusion_of :birthday, :in => Range.new(Date.today, Date.parse( (18.years.ago).strftime(''%Y/%m/%d'') )), :message => "does not meet Terms of Service requirements" " Date.parse( (16.years.ago).strftime(''%Y/%m/%d'') ) " works as expected in console, however the validatio...
2007 Nov 03
3
Birthdate validation
...9]+\.)+[a- z]{2,})$/i validates_acceptance_of :policy_agreement, :message => "must be accepted. You have to read and agree with the Aykall Policies before signing in." validates_multiparameter_assignments :message => " is not a valid date." age_limit = Date.new(Date.today.year, Date.today.month, Date.today.day).change(:year => Date.today.year - 18) validates_numericality_of :birth_date, :less_than => age_limit, :message => "is invalid. You have to be at least 18 years old to sign in." end I''m getting the error message "undefined me...
2006 Apr 22
4
How to supress field name in error message?
...in the full error message? I want the error to be associated with the field so that the .fieldWithErrors class is applied to the field but I don''t want it to add the field name to the actual error message. For example: errors.add("occurs_on", "The date can''t be today!") unless occurs_on != Date.today I would like the error to read: The date can''t be today! Rather than: Occurs on The date can''t be today! Is there any way to do this? Thanks in advance Dave
2006 Feb 28
5
Getting number of days in a month
...t the number of days in the current month: echo date("t"); // Outputs "28" for February I don''t see anything like this in Ruby/Rails. Right now, I''m using a very ugly line to pull the last day of the month: @number_of_days = (Date.strptime(Date.today.strftime("%Y-%m-01")) >> 1) - 1 Basically, it takes the first day of the current month, adds one month, and then subtracts one day. Am I completely overlooking some obvious and easy way to do this? (I''m assuming so).
2014 Jul 29
2
SIG IRC meeting today at 2pm UK time - call for agenda items / attendees
Hi all, we do have an IRC SIG meeting scheduled for 2pm UK today. George is in the US and may not be able to join as the call is early. It also looks as if I may not be able to join. Are there any items to discuss? If so, please raise anything you want to discuss Who is planning to join? Raise your hand in the next hour If I don't get items/particip...
2009 Apr 11
3
Updated today - number of rows
How can I get number of rows that was updated "today"? Table: messages (id, title, message, updated_at) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this gro...
2014 Nov 26
2
[LLVMdev] LVM buildmaster will be restarted today after 6 PM Pacific
Hello everyone, LLVM buildmaster will be restarted today after 6 PM Pacific time today. Thanks Galina -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141126/2d94025c/attachment.html>
2001 Mar 22
5
Major network slowdown today... Samba the cause?
Today, our network has been excruciatingly slow. I checked the log.nmb file, and I noticed that today, the Samba PDC has been losing its "local master browser" status every 2 minutes or so, for about 15 seconds, to a Win9x client. Before today, this also happened, but only a few times each...
2006 Apr 23
37
Newbie .. nil object and missing something obvious
...l case, and it''s still not working. Code presented below.. ---------------------------------------------------------------------- in "app/controllers/dashboard_controller.rb" class DashboardController < ApplicationController def display_calendar @dates[0] = Date.Today @dates << Date.Today + 1 end end in "app/views/dashboard/display_calendar.rhtml" <h1>Display Calendar</h1> <p> First day should be <%= Date.today %><br/> Second day should be <%= Date.today + 1 %> First day is &l...
2004 Sep 24
2
Digium Closed Today?
Has anybody been able to get in touch with anybody at digium today? Regards Greg Cirino ___________________________________ Cirelle Enterprises Inc. 603-425-2221 www.cirelle.com Website Design www.cirelle.net ProSpeed High Speed Dial-up - 5 Times Faster www.cedata.com Web, FTP, Email Hosting Services www.mlsbot.com MLS IDX Services When You Want It Done Well, J...
2008 Sep 01
3
GIT issues today?
...;source.winehq.org/git/wine.git wine Initialized empty Git repository in /home/evil/src/wine/.git/ source.winehq.org[0: 209.46.25.134]: errno=Connection refused fatal: unable to connect a socket (Connection refused) Is it just me, or is this happening to everyone today?
2005 Mar 24
1
43Things.com on the Today show?
They weren''t as far as I know. But maybe they should be soon. It looks like the Today Show (a morning show on NBC in the US) is doing a "Live for Today" segment, basically the same thing that 43 Things is doing. Maybe someone from Robot Coop should let them know about 43 Things. http://www.msnbc.msn.com/id/7225307/ -Lee
2007 May 01
3
Installed CentOS 5 today, question about an error I'm getting
So I did a fresh install today. Decided to go ahead and upgrade. Everything seems okay save for three problems. #1 - I get a message during boot saying that an Intel microcode update didn't work. Something about not being able to find /proc/microcode. #2 - I can't use the Firefox extension HTML Parser. Anyone u...
2010 Feb 19
5
[LLVMdev] LLVM Server down ** TODAY **
Just a reminder that the LLVM/Clang Server will be down starting today and through most of the weekend. It will go offline sometime between 12-1pm PST. I'll send out mail when the new server is up and ready. Thanks, Tanya
2007 Mar 13
6
Easy Date question - newb
All I want to do is find the objects that were created today under the ''created_on'' column. I''ve tried many ways, here is one example using the chronic gem. @products = Product.find_all_by_created_on(Chronic.parse(''today'')) I must be missing something right in front of me .... Thanks for any help. --~--~------...
2018 May 13
2
is there any method to defer the execution of code in r?
dear members, I have created the following function to read a csv file from a given URL: function(){ s <- 1; #first get the bhav copy today <- c();ty <- c();tm <- c();tmu <- c();td <- c(); # get the URL first today <- Sys.Date() ty <- format(today, format = "%Y") tm <- format(today, format =...
2014 Dec 02
3
Reminder: CentOS Virt SIG call today, 2pm GMT
Just a reminder to everyone, we've got our bi-weekly Virt SIG meeting today. It's on a phone bridge this time; e-mail me if you want the dial-in information. Lars, will you be hosting the call, or shall I? -George
2006 Jul 06
4
get month number of a date
how can i get the month number of a specific. for example this code don?t work month(Date.today) -- Posted via http://www.ruby-forum.com/.