[tomboy-list] custom timestamp format: week number?

Sandy Armstrong sanfordarmstrong at gmail.com
Wed Jul 22 07:10:12 PDT 2009


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 at gmail.com> 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 at gmail.com> 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 at lists.beatniksoftware.com
>> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>>
>>
> _______________________________________________
> Tomboy-list mailing list
> Tomboy-list at lists.beatniksoftware.com
> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>


More information about the Tomboy-list mailing list