custom timestamp format: week number?

View: New views
6 Messages — Rating Filter:   Alert me  

Parent Message unknown custom timestamp format: week number?

by mathias chakib bellout :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi!
love you software. Is there any possibility to add week number into the custom timestamp format?
best regards
Mathias



_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Re: custom timestamp format: week number?

by Stefan Schweizer-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We use Mono format strings to format timestamps. Quite surprisingly,
there is no format specifier for the year's week. Here is a link to
the relevant documentation:
http://www.go-mono.com/docs/index.aspx?link=T%3aSystem.Globalization.DateTimeFormatInfo

I think it is not possible to display the week number with our current
implementation. Or have I overlooked something?

        Stefan

On Wed, Jul 22, 2009 at 12:20 PM, mathias chakib
bellout<chakibbb@...> wrote:

>
> Hi!
> love you software. Is there any possibility to add week number into the
> custom timestamp format?
> best regards
> Mathias
>
>
> _______________________________________________
> Tomboy-list mailing list
> Tomboy-list@...
> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>
>
_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Re: custom timestamp format: week number?

by Sandy Armstrong :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Google says:

http://snippets.dzone.com/posts/show/856

public static int weekNumber(DateTime dt) {
        CultureInfo culture = CultureInfo.CurrentCulture;
        int intWeek = culture.Calendar.GetWeekOfYear(dt,
CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
        return intWeek;
}

Seems fairly reasonable.

Sandy

On Wed, Jul 22, 2009 at 5:48 AM, Stefan
Schweizer<steve.schweizer@...> wrote:

> We use Mono format strings to format timestamps. Quite surprisingly,
> there is no format specifier for the year's week. Here is a link to
> the relevant documentation:
> http://www.go-mono.com/docs/index.aspx?link=T%3aSystem.Globalization.DateTimeFormatInfo
>
> I think it is not possible to display the week number with our current
> implementation. Or have I overlooked something?
>
>        Stefan
>
> On Wed, Jul 22, 2009 at 12:20 PM, mathias chakib
> bellout<chakibbb@...> wrote:
>>
>> Hi!
>> love you software. Is there any possibility to add week number into the
>> custom timestamp format?
>> best regards
>> Mathias
>>
>>
>> _______________________________________________
>> Tomboy-list mailing list
>> Tomboy-list@...
>> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>>
>>
> _______________________________________________
> Tomboy-list mailing list
> Tomboy-list@...
> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>
_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Re: custom timestamp format: week number?

by Stefan Schweizer-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, but you cannot use that snippet to format a timestamp for the
Insert Timestamp-addin. I think that is what Mathias wants to do.

On Wed, Jul 22, 2009 at 4:10 PM, Sandy
Armstrong<sanfordarmstrong@...> wrote:

> Google says:
>
> http://snippets.dzone.com/posts/show/856
>
> public static int weekNumber(DateTime dt) {
>        CultureInfo culture = CultureInfo.CurrentCulture;
>        int intWeek = culture.Calendar.GetWeekOfYear(dt,
> CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
>        return intWeek;
> }
>
> Seems fairly reasonable.
>
> Sandy
>
> On Wed, Jul 22, 2009 at 5:48 AM, Stefan
> Schweizer<steve.schweizer@...> wrote:
>> We use Mono format strings to format timestamps. Quite surprisingly,
>> there is no format specifier for the year's week. Here is a link to
>> the relevant documentation:
>> http://www.go-mono.com/docs/index.aspx?link=T%3aSystem.Globalization.DateTimeFormatInfo
>>
>> I think it is not possible to display the week number with our current
>> implementation. Or have I overlooked something?
>>
>>        Stefan
>>
>> On Wed, Jul 22, 2009 at 12:20 PM, mathias chakib
>> bellout<chakibbb@...> wrote:
>>>
>>> Hi!
>>> love you software. Is there any possibility to add week number into the
>>> custom timestamp format?
>>> best regards
>>> Mathias
>>>
>>>
>>> _______________________________________________
>>> Tomboy-list mailing list
>>> Tomboy-list@...
>>> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>>>
>>>
>> _______________________________________________
>> Tomboy-list mailing list
>> Tomboy-list@...
>> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>>
>
_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Re: custom timestamp format: week number?

by Sandy Armstrong :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Right, sorry, I just meant it looked like we could add support in a
future version without getting too hacky about it.  :-)

Mathias, you might want to file an enhancement bug in bugzilla so this
request doesn't get lost. :-)

Sandy

On Wed, Jul 22, 2009 at 7:41 AM, Stefan
Schweizer<steve.schweizer@...> wrote:

> OK, but you cannot use that snippet to format a timestamp for the
> Insert Timestamp-addin. I think that is what Mathias wants to do.
>
> On Wed, Jul 22, 2009 at 4:10 PM, Sandy
> Armstrong<sanfordarmstrong@...> wrote:
>> Google says:
>>
>> http://snippets.dzone.com/posts/show/856
>>
>> public static int weekNumber(DateTime dt) {
>>        CultureInfo culture = CultureInfo.CurrentCulture;
>>        int intWeek = culture.Calendar.GetWeekOfYear(dt,
>> CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
>>        return intWeek;
>> }
>>
>> Seems fairly reasonable.
>>
>> Sandy
>>
>> On Wed, Jul 22, 2009 at 5:48 AM, Stefan
>> Schweizer<steve.schweizer@...> wrote:
>>> We use Mono format strings to format timestamps. Quite surprisingly,
>>> there is no format specifier for the year's week. Here is a link to
>>> the relevant documentation:
>>> http://www.go-mono.com/docs/index.aspx?link=T%3aSystem.Globalization.DateTimeFormatInfo
>>>
>>> I think it is not possible to display the week number with our current
>>> implementation. Or have I overlooked something?
>>>
>>>        Stefan
>>>
>>> On Wed, Jul 22, 2009 at 12:20 PM, mathias chakib
>>> bellout<chakibbb@...> wrote:
>>>>
>>>> Hi!
>>>> love you software. Is there any possibility to add week number into the
>>>> custom timestamp format?
>>>> best regards
>>>> Mathias
>>>>
>>>>
>>>> _______________________________________________
>>>> Tomboy-list mailing list
>>>> Tomboy-list@...
>>>> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>>>>
>>>>
>>> _______________________________________________
>>> Tomboy-list mailing list
>>> Tomboy-list@...
>>> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>>>
>>
>
_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Re: custom timestamp format: week number?

by mathias chakib bellout :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Right, I'll do that. thanks guys!
Mathias

On Wed, Jul 22, 2009 at 4:54 PM, Sandy Armstrong <sanfordarmstrong@...> wrote:
Right, sorry, I just meant it looked like we could add support in a
future version without getting too hacky about it.  :-)

Mathias, you might want to file an enhancement bug in bugzilla so this
request doesn't get lost. :-)

Sandy

On Wed, Jul 22, 2009 at 7:41 AM, Stefan
Schweizer<steve.schweizer@...> wrote:
> OK, but you cannot use that snippet to format a timestamp for the
> Insert Timestamp-addin. I think that is what Mathias wants to do.
>
> On Wed, Jul 22, 2009 at 4:10 PM, Sandy
> Armstrong<sanfordarmstrong@...> wrote:
>> Google says:
>>
>> http://snippets.dzone.com/posts/show/856
>>
>> public static int weekNumber(DateTime dt) {
>>        CultureInfo culture = CultureInfo.CurrentCulture;
>>        int intWeek = culture.Calendar.GetWeekOfYear(dt,
>> CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
>>        return intWeek;
>> }
>>
>> Seems fairly reasonable.
>>
>> Sandy
>>
>> On Wed, Jul 22, 2009 at 5:48 AM, Stefan
>> Schweizer<steve.schweizer@...> wrote:
>>> We use Mono format strings to format timestamps. Quite surprisingly,
>>> there is no format specifier for the year's week. Here is a link to
>>> the relevant documentation:
>>> http://www.go-mono.com/docs/index.aspx?link=T%3aSystem.Globalization.DateTimeFormatInfo
>>>
>>> I think it is not possible to display the week number with our current
>>> implementation. Or have I overlooked something?
>>>
>>>        Stefan
>>>
>>> On Wed, Jul 22, 2009 at 12:20 PM, mathias chakib
>>> bellout<chakibbb@...> wrote:
>>>>
>>>> Hi!
>>>> love you software. Is there any possibility to add week number into the
>>>> custom timestamp format?
>>>> best regards
>>>> Mathias
>>>>
>>>>
>>>> _______________________________________________
>>>> Tomboy-list mailing list
>>>> Tomboy-list@...
>>>> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>>>>
>>>>
>>> _______________________________________________
>>> Tomboy-list mailing list
>>> Tomboy-list@...
>>> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>>>
>>
>


_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com