Displaying 20 results from an estimated 500 matches similar to: "Date formatting and adding question"
2006 Oct 24
13
How can my boss take rails seriously with bugs like this?
The Time::next_week method is supposed to give the time of the start of
the next week. But look at this, it cocks up :
>> t=Time.parse "Monday October 16th 2006"
=> Mon Oct 16 00:00:00 BST 2006
>> t.next_week
=> Mon Oct 23 00:00:00 BST 2006
>> t.next_week.next_week
=> Tue Oct 24 00:00:00 BST 2006
>> t.next_week.next_week.next_week
=> Mon Oct 30
2009 Aug 19
2
installing MS Office Project 2007 from trial disc
Hello,
I can't get setup.exe to install Microsoft Office Project 2007 on Xubuntu Jaunty 9.04 using Wine 1.0.1. At first the installation box will open, and I may see a hint of the colorful Office 2007 logo; but then a small box opens and says "Setup cannot continue because a required file is either corrupted or not available. Run Setup again from the original source disc or download
2006 Jul 05
1
time.next_week bug?
i ran into an error today when dealing with the method next_week and
daylight savings time...
>> Time.local( 2006,10,23 ).next_week
=> Tue Oct 24 00:00:00 EDT 2006
Any one know if this is a know issue or should a ticket be created for this
issue?
thanks for the help
mark
--
Mark Van Holstyn
mvette13@gmail.com
http://lotswholetime.com
-------------- next part --------------
An HTML
2020 Jun 23
2
Voice broken during calls (again...)
Am 23.06.2020 10:07, schrieb Marek Greško:
Hi
> this is a correct response:
>
> From 62.156.246.57 (62.156.246.57) icmp_seq=1 Frag needed and DF set
> (mtu = 1492)
>
> So PMTU discovery is working. No problem here. You got correct message
> to lower the packet size from 62.156.246.57. This is probably the last
> hop before your site.
No, the last hop is 62.156.246.65:
2006 Apr 25
1
Array of dates/times from time.now till nextweek
Hi,
I would like to make @dates in my controller.
I tried the following:
startdate = Time.now
enddate = startdate.next_week
for enddate > startdate
@dates << startdate
startdate = startdate.tomorrow
end
But I get an errormessage when I check the syntax:
"warning: useless use of a variable in void context"
Anyone?
Thanks!
Steven.
--
Posted via
2006 Mar 01
3
Convert Date to Time
Hi,
How do i convert a Date to a Time??
I have a date returned from sql and i need to be able to use handy
functions like next_week or beggining of week.
Any help appreciated
Thanks,
Chris
--
Posted via http://www.ruby-forum.com/.
2006 Mar 14
21
Changing default date format in Rails
I''ve spent all day digging through the rails api and postgres-pr on
this, I think it''s time to ask the list.
Postgres stores a Date in YYYY-MM-DD format. My users want the dates
in MM/DD/YYYY format.
Sure, I could explicitly convert it on the app level every place where
a date is displayed, but that seemed like a DRY violation.
I thought I''d be clever and simply
2006 Jul 31
2
is it possible to make to_xml use underscore instead of dash?
Hi all,
I am getting ActiveRecord to produce XML with
render :xml => @user.to_xml
However, on the client end it is a bit annoying for me to deal with
attributes like first-name. I would much rather have first_name.
Is there any way for me to turn off the behavior of converting _ to -?
This seems to be done by a call to dasherize inside the to_xml of
2006 Mar 23
5
Custom date format
Hi, I''ve followed these directions :
http://railswiki.pdxruby.org/HowToDefineYourOwnDateFormat.html
It seems pretty straightforward but obviously it doesn''t work for me...
article.date_edited.to_formatted_s(:my_format_1)
produce a default formatted date, not the one I''ve defined in
environment.rb :
ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge!(
2006 Jul 17
2
european date format
hi, overhere users go nuts if they have to enter the date in iso format,
so i have to make my applications in such a way that not only dates are
displayed in the "dd-mm-yyy" format but also can be entered in that way.
somewhere i found this code to put in the environment script:
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.update(
:default => ''%d/%m/%Y
2006 Jun 14
5
display formatted date
Hi,
In my form I have date field set as ''datetime_select'' which is fine as I
wanted it in the same format. But while displaying (list action) it
displays date in long format i.e. ''Tue May 30 15:39:00 Central Daylight
Time 2006''. How can I format it so that it will just be diaplyed as
''dd/mm/yyyy'' format?
Thanks
--
Posted via
2007 Sep 06
2
HABTM Loops
So, I have a "schedules" table and a "hours" table, joined by a
"hours_schedules" table. Think of the hours table as a category for
when people will schedule themselves to work, which happens in weekly
increments. At any given hour, there will be X number of people
working. I need to represent each worker with an asterisk symbol in
the weekly view. For example,
2006 May 11
4
string to date/time?
Hey All,
Anyone know of a library for parsing "human" dates, like "this friday"
or "2 days ago"? I used to use strtotime in php, but starting from
here;
http://wiki.rubyonrails.com/rails/pages/PhpStrtotime
and doing lots of googling, I haven''t been able to find anything
similar for ruby. I know of javascript solutions to this, but I''d
need to do
2006 Jan 07
1
How to DRY with Fixtures (helper or extend Time class, how)?
I have a test/fixtures/users.yml like so:
apa:
id: 1
username: apa
[...]
created_at: <%=Time.now.strftime("%Y-%m-%d %H:%M:%S")%>
updated_at: <%=Time.now.strftime("%Y-%m-%d %H:%M:%S")%>
I don''t like how I''m repeating myself with the strftime bit.
Is there some shorter Time method to format time for a (MySQL) datetime
field that
2009 Jun 15
1
calendardateselect problem
I am using http://code.google.com/p/calendardateselect/ for my date
time picker.
I am using dd.mm.yyyy format (:finnish)
and i am using
ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge!
(:default => "%d.%m.%Y")
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!
(:default => "%d.%m.%Y %H:%M")
in my enviroment. Everything is working
2018 May 01
0
how can I convert a long to wide matrix?
Hi Marna,
This is a condition that the function cannot handle. It would be
possible to reformat the result based on the time intervals, but the
stretch_df function doesn't try to interpret the values, just
stretches them out to a wide format.
Jim
On Wed, May 2, 2018 at 9:16 AM, Marna Wagley <marna.wagley at gmail.com> wrote:
> Hi Jim,
> The data set is correct. I took two
2009 Feb 20
3
Years gone by (deprecation of years method)
Can anyone give me some insight as to why the
ActiveSupport::CoreExtensions::Float::Time method ''years'' is being
deprecated? I have an application managing contracts and being able to
manipulate and report on them based on the number of years the contract
lasts, is very convenient.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
2018 May 01
2
how can I convert a long to wide matrix?
Hi Jim,
Thank you very much for your suggestions. I used it but it gave me three
sites. But actually I do have only two sites "Id_X" and "Id_y" . In fact
"A" is repeated two times for "Id_X". If it is repeated, I would like to
take the first one among many repeated values.
dat<-structure(list(ID = structure(c(1L, 1L, 1L, 2L, 2L), .Label =
2018 May 01
2
how can I convert a long to wide matrix?
Hi Jim,
The data set is correct. I took two readings from the "SITE A" within a
short time interval, therefore I want to take the first value if there are
repeated within a same group of "timeGroup".
Therefore I wanted following
FinalData1
B1 B2
id_X "A" "B"
id_Y "A" "B"
thanks,
On Tue, May 1, 2018 at 4:05 PM, Jim
2018 May 01
0
how can I convert a long to wide matrix?
Hi Marna,
I think this is due to having three rows for id_X and only two for
id_Y. The function creates a data frame with enough columns to hold
the greatest number of values for each ID variable. Notice that the
SITE_n columns contain three values for id_X (A, A, B) and two for
id_Y (A, B, NA) as there was no third occasion of measurement for the
latter. Even though there are only two _values_