mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] \date in the qt version


Chronological Thread 
  • From: "Adrian S." <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] \date in the qt version
  • Date: Tue, 13 Sep 2011 14:57:34 -0600

This is the full set in that link
QDateTime QDateTime::fromString ( const QString & string, const
QString & format ) [static]
Returns the QDateTime represented by the string, using the format
given, or an invalid datetime if the string cannot be parsed.
These expressions may be used for the date part of the format string:
Expression Output
d
the day as number without a leading zero (1 to 31)
dd
the day as number with a leading zero (01 to 31)
ddd
the abbreviated localized day name (e.g. 'Mon' to 'Sun'). Uses
QDate::shortDayName().
dddd
the long localized day name (e.g. 'Monday' to 'Sunday'). Uses
QDate::longDayName().
M
the month as number without a leading zero (1-12)
MM
the month as number with a leading zero (01-12)
MMM
the abbreviated localized month name (e.g. 'Jan' to 'Dec'). Uses
QDate::shortMonthName().
MMMM
the long localized month name (e.g. 'January' to 'December'). Uses
QDate::longMonthName().
yy
the year as two digit number (00-99)
yyyy
the year as four digit number
Note: Unlike the other version of this function, day and month names
must be given in the user's local language. It is only possible to use
the English names if the user's language is English.
These expressions may be used for the time part of the format string:
Expression Output
h
the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)
hh
the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)
H
the hour without a leading zero (0 to 23, even with AM/PM display)
HH
the hour with a leading zero (00 to 23, even with AM/PM display)
m
the minute without a leading zero (0 to 59)
mm
the minute with a leading zero (00 to 59)
s
the second without a leading zero (0 to 59)
ss
the second with a leading zero (00 to 59)
z
the milliseconds without leading zeroes (0 to 999)
zzz
the milliseconds with leading zeroes (000 to 999)
AP or A
interpret as an AM/PM time. AP must be either "AM" or "PM".
ap or a
Interpret as an AM/PM time. ap must be either "am" or "pm".
All other input characters will be treated as text. Any sequence of
characters that are enclosed in singlequotes will also be treated as
text and not be used as an expression.

On Tue, Sep 13, 2011 at 2:54 PM, Adrian S. <address@hidden> wrote:
> That did it!
>
> Thanks!
> -Adrián
>
> On Tue, Sep 13, 2011 at 2:47 PM, Gubinelli Massimiliano
> <address@hidden> wrote:
>> I will study a permanent solution. In the meanwhile you can refer to
>>
>> http://doc.qt.nokia.com/stable/qdatetime.html
>>
>> (look at the description of the  QDateTime::fromString function) to build
>> a formatting string suitable for TeXmacs/Qt. For example in your case
>>
>> <date| d MMMM 'om' h:m>
>>
>> should work.
>>
>> best
>> massimiliano
>>
>>
>>
>> On 13 sept. 2011, at 02:34, Adrian S. wrote:
>>
>>> I just compiled the qt version (I had to install libqt4-dev in
>>> UBUNTU).  I tried to install in a directory using ./config
>>> --prefix=directory.  The program compiled successfully but TeXmacs
>>> complained that it could not find guile.  Then I installed it un
>>> /usr/local/ and everything worked...
>>>
>>> However:
>>> The \date macro does not accept other values...
>>>
>>> for example
>>> <date| %d %B om %k:%M> should return
>>> 12 September om 18:29
>>>
>>> but returns
>>> %d %B om %k:%M instead...
>>>
>>> The X11 version does not have that problem
>>>
>>> If there is a work around to that, I would greatly appreciate.
>>>
>>> Great work!
>>> -Adrián.
>>
>>
>



Archive powered by MHonArc 2.6.19.

Top of page