Re: an annual calendar somewhere? (done)

2010-03-02 Thread Andre.Bisseret

Bonjour,

Thanks a lot to Robert, Zrypt, Richard, Bernd who provided very  
helpful material and the others who chimed in helping to push along :-)


I have now an annual calendar with 12 lines, one for each month.
The days of weeks are in a separate field at the top of the display  
(not repeated for each month)
The months are also in a separate field on the left of the main field  
which displays the day numbers.

The year is in a separate field too at the top left.

So it is easy to select any range of days either from a single month  
or across two (or more) months.


Oh! happy day ;-))

Best regards from Grenoble

André
 the script ---

-- 03/2010
-- first script from Richard Gaskin, completed and improved by Zryip  
theSlug. (comments are from them)
-- I only adapted it to my needs (months in lines instead of tables;  
several fields instead of a single one)


on mouseUp
   set useSystemDate to true
   put empty into fld "calendar field"
   put empty into fld "chMonths"
   put empty into fld "weekDayNames"
   createLineOfDays
   ask "Quelle année ?" with last word of the abbrev system date
   put it into yearToMake
   put yearToMake into fld "theYear"
   put createDate(yearToMake,1,1) into tStartDate -- Create the  
January, 1 2010 in your local language system
   repeat with tMonthNumber = 0 to 11 -- Create months for January  
(1) to December (12)
  put Cal(addToDate(tStartDate,0,tMonthNumber,0),"Monday") & cr  
after fld "calendar field"

   end repeat
end mouseUp

on createLineOfDays --to be put in a separate field at the top
   -- Make day names header: -- in AWEEK
   put "Monday" into pFirstDayWeek
   put weekdayNamesList(pFirstDayWeek) into tWeekdayNames
   put empty into aWeek
   put empty into fourWeeks
   repeat for each line tDay in tWeekdayNames
  put char 1 to 2 of tDay &" " after aWeek --after tCal
   end repeat
   -- Make 5 weeks + lu ma
   repeat 5
  put aWeek & tab after fourWeeks
   end repeat
   put fourWeeks & "lu ma" into fld "weekDayNames"
end createLineOfDays

function Cal pDate, pFirstDayWeek
  set useSystemDate to true
   -- Returns a plain-text calendar representation of
   -- the month the date specified in pDate is in.
   -- If no month is provided it uses the current
   -- month. Month and day names use the user's current
   -- system settings.
   --
   -- Use current date as default:
   if pDate is empty then put the date into pDate
   if pFirstDayWeek is empty then put "Sunday" into pFirstDayWeek
   -- Verify date is valid:
   convert pDate to dateitems
   if the result is not empty then return "Error: "& the result
   --
   put empty into tCal
   --
   -- Make month/year header:
   put item 1 of pDate into tYear
   put item 2 of pDate into tMonthNumber
   put line (tMonthNumber) of the monthNames into tMonth
   --put tMonth && tYear into tHeader
   --put tHeader & cr after fld "chMonths"
   put tMonth & cr after fld "chMonths" -- in an extra field on the  
left

   --
   -- Pad beginning with empty days:
   put createDate(tYear,tMonthNumber,1) into tStartDay
   convert tStartDay to dateitems
   get last item of tStartDay
   if (pFirstDayWeek is "Monday") then
  if (it = 1) then
 put 6 into tPad -- fix the case that the day is Sunday  
(value1) - 2 = - 1

  else
 put (it - 2) into tPad
  end if
   else
  put (it - 1) into tPad
   end if

   repeat for tPad
  put "   " after tCal
   end repeat

   put createDate(tYear,tMonthNumber,1) into tStartDay -- create a  
date in the system's local language


   -- Walk through 31 days, stopping when we reach a
   -- number not valid for the month we're doing:

   repeat with i = 1 to dayOf(addToDate(tStartDay,0,1,-1))
  -- the end value is the number of days in the month. To obtain  
the last date of a month, add 1 month and subtract one

  -- day to the first day of a month
  -- Get day number:
  put createDate(tYear,tMonthNumber,i) into tDate
  convert tDate to dateitems
  if the result is not empty then exit repeat
  put item 3 of tDate into tDayNum
  --
  -- Pad it and add it:
  if len(i) = 1 then put " " before i
  put i &" " after tCal
  --
  -- Go to next line if we're at the end of the week:
  if last item of tDate = lastDayOfWeek(pFirstDayWeek) then put  
tab after tCal --cr after tCal

   end repeat
   --
   -- Send it to the caller:
   return tCal
end Cal

function weekdayNamesList pFirstDay
  set useSystemDate to true
  put the abbr weekdayNames into tWeekdayNames
  if pFirstDay is "Monday" then
 put cr&first line of tWeekdayNames after tWeekdayNames
 delete first line of tWeekdayNames
  end if
  return tWeekdayNames
end weekdayNamesList

function lastDayOfWeek pFirstDay
  if pFirstDay is "Monday" then
 return 1
  else
 return 7
  end if
end lastDayOfWeek

function firstDayInMonth pStartDate
  -- Return the first day in a month
 set useSystemDate to true
  convert pStartDate to dateitems
  p

Re: an annual calendar somewhere?

2010-03-01 Thread Andre.Bisseret


Le 1 mars 10 à 12:06, BNig a écrit :



André,

I haven't tried to select a range of dates, yet.
I tried but seems not possible in a table field (?)


in the property inspector for the field of stack "calendar lines" go  
to
tables, unselect crevTable, than in the basic properties make shure  
lock
text is true and traversal on is checked. Then you can select text  
in the

field.
regards
Bernd
--

Ah! yeesss!  that is working well :-)) (am learning every day!)

Thank you very much Bernd

André

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-03-01 Thread BNig

André,
 >I haven't tried to select a range of dates, yet.
>I tried but seems not possible in a table field (?)

in the property inspector for the field of stack "calendar lines" go to
tables, unselect crevTable, than in the basic properties make shure lock
text is true and traversal on is checked. Then you can select text in the
field.
regards
Bernd
-- 
View this message in context: 
http://n4.nabble.com/an-annual-calendar-somewhere-tp1569025p1573418.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-03-01 Thread Andre.Bisseret

Bonjour Robert,

Le 28 févr. 10 à 23:26, Robert Cole a écrit :


André:
I continue to have fun with your calendar question.

Am very glad to hear that :-)
I just uploaded another stack called "Calendar Lines" that produces  
a one-line-per-month format.

I downloaded it; really nice look :-)
It also allows you to transpose the calendar into a one-column-per- 
month.

Yeess! that's very good: I am still hesitating between the two formats.
I wrote a transpose function that uses the split command and the  
extents function.
I am going to study your script : I still have to get familiar with  
these functions, and more familiar with arrays (I began to use them a  
bit when Trevor' data grid appears;  but I must confess that, up to  
now, I use them only when it is very necessary ;-)



I haven't tried to select a range of dates, yet.

I tried but seems not possible in a table field (?)
Up to now, I am using a simple text field (with tab stops). Then I can  
select ranges of dates; but I am going to suppress the months'names at  
the beginning of the lines and to put them in an extra field on the  
left of the main field. So that I be able to select ranges including  
last days of one month and first days of the following month without  
including the name of the second month.


Thanks a lot for your attention and your Calendar Lines"

Best regards from Grenoble

André




___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-03-01 Thread Andre.Bisseret

Bonjour Zryip,

Le 27 févr. 10 à 20:21, zryip theSlug a écrit :
…
…

To fix this bug, replace the pad part by this new portion:

   -- Pad beginning with empty days:
  put createDate(tYear,tMonthNumber,1) into tStartDay
  convert tStartDay to dateitems
  get last item of tStartDay
  if (pFirstDayWeek is "Monday") then
 if (it = 1) then
put 6 into tPad -- fix the case that the day is Sunday (value
1) - 2 = - 1
 else
put (it - 2) into tPad
 end if
  else
 put (it - 1) into tPad
  end if

  repeat for tPad
put "   " after tCal
  end repeat


Nice! all is OK now
…
…

Now a little trick with my code. It could give you free times if you
have missed it ;)


You are really considerate ;-))


How to create an easy loop to add months:

put createDate(2010,1,1) into tStartDate -- Create the January, 1 2010
in your local language system
repeat with tMonthNumber = 0 to 11 -- Create months for January (1) to
December (12)
 put cal(addToDate(tStartDate,0,tMonthNumber,0),"Monday") & cr
after fld "MyField"
end repeat

Thanks a lot. That's working like a charm. The 12 months are created  
very fast. Magnifique! (table or lines as well :-))


I am doing trials to improve my "in lines" layout : I think I will  
keep only one line for the days of weeks at the top of the field and I  
will isolate the months' names in an extra field on the left (to avoid  
that a month'name be selected when dragging from the end of a month to  
the beginning of the following one.



Have a nice week

Best regards from Grenoble

André

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-28 Thread Robert Cole

André:
I continue to have fun with your calendar question.
I just uploaded another stack called "Calendar Lines" that produces a  
one-line-per-month format.
It also allows you to transpose the calendar into a one-column-per- 
month.
I wrote a transpose function that uses the split command and the  
extents function.

I haven't tried to select a range of dates, yet.
If this is of interest, download "Calendar Lines" from RevOnline and  
take a look.

Bob

--
Thank you much Bob for this nice calendar.
Also, thanks to the others who added comments, results of trials and
elaborated.
I was not waiting for such a "rush" on this topic ;-))

However, my problem is not solved with this kind of layout. Mostly I  
need

that the user be able to highlight periods of the year.
For example periods when a holidays' house has been rented (or is plan  
to be

rented).

With the present layout that can't be done. One can't drag (in order to
highlight)  from jan. 2 to jan 9 for example, or from jan. 30 to feb 6  
etc


That why I am looking for an annual calendar with 12 rows/lines, one for
each month ( or might be 12 columns).

André, if you need some examples have a look to the lab experiment 009
 
http://www.aslugontheroad.co.cc/index.php?option=com_content&view=article&id=68:experiment-009-playing-with-the-david-becks-calendar-lib&catid=35:lab&Itemid=53
HTH,
--
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-27 Thread zryip theSlug
2010/2/27 Andre.Bisseret :
> Bonjour Zryip,
>
> Starting from your very nice script, I am modifying it so that I obtain one
> month per line.
> I managed to get the days of weeks repeated five times separated by tab in
> the first line of the field (with tab stops in it)
>  I suppressed carriage returns and I added "tab" between weeks.
> Not too difficult up to now :-)
> Not completed yet (currently I am getting one month nearly as I expected.
>
> While doing trials, I just noticed that, when pFirstDayWeek is "Monday", if
> the first day of a month is actually "sunday" then there is a flaw: the "1"
> is set up under "monday" instead of "sunday" while "2" is at its right place
> (second line).
>
> I got that for example when trying "1/0810" (August 2010)
>
> This does not happen with pFirstDayWeek = "Sunday" (I tried for months
> beginning a saturday).
>
> I must confess that I did not study your script deeply
> (I just made few local modifications to quicky obtain a month with an
> aligned format instead of a table.
>
> So you likely will see faster than me how to fix that issue ;-))

Bonjour André!

Thanks for your feedback ;)


To fix this bug, replace the pad part by this new portion:

    -- Pad beginning with empty days:
   put createDate(tYear,tMonthNumber,1) into tStartDay
   convert tStartDay to dateitems
   get last item of tStartDay
   if (pFirstDayWeek is "Monday") then
  if (it = 1) then
 put 6 into tPad -- fix the case that the day is Sunday (value
1) - 2 = - 1
  else
 put (it - 2) into tPad
  end if
   else
  put (it - 1) into tPad
   end if

   repeat for tPad
     put "   " after tCal
   end repeat

>
> Anyway, thanks a lot for your improvement of the Richard'script; I
> particularly appreciate the possibililty to choose between Sunday and Monday
> as the first day of week. Thanks to your script I am sure I will get the
> format I am expecting.
>

You're welcome 8-)

Now a little trick with my code. It could give you free times if you
have missed it ;)

How to create an easy loop to add months:

put createDate(2010,1,1) into tStartDate -- Create the January, 1 2010
in your local language system
repeat with tMonthNumber = 0 to 11 -- Create months for January (1) to
December (12)
  put cal(addToDate(tStartDate,0,tMonthNumber,0),"Monday") & cr
after fld "MyField"
end repeat


Regards,
-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-27 Thread Andre.Bisseret

Bonjour Zryip,

Starting from your very nice script, I am modifying it so that I  
obtain one month per line.
I managed to get the days of weeks repeated five times separated by  
tab in the first line of the field (with tab stops in it)

 I suppressed carriage returns and I added "tab" between weeks.
Not too difficult up to now :-)
Not completed yet (currently I am getting one month nearly as I  
expected.


While doing trials, I just noticed that, when pFirstDayWeek is  
"Monday", if the first day of a month is actually "sunday" then there  
is a flaw: the "1" is set up under "monday" instead of "sunday" while  
"2" is at its right place (second line).


I got that for example when trying "1/0810" (August 2010)

This does not happen with pFirstDayWeek = "Sunday" (I tried for months  
beginning a saturday).


I must confess that I did not study your script deeply
(I just made few local modifications to quicky obtain a month with an  
aligned format instead of a table.


So you likely will see faster than me how to fix that issue ;-))

Anyway, thanks a lot for your improvement of the Richard'script; I  
particularly appreciate the possibililty to choose between Sunday and  
Monday as the first day of week. Thanks to your script I am sure I  
will get the format I am expecting.


Best regards from Grenoble

André




Le 27 févr. 10 à 01:12, zryip theSlug a écrit :


2010/2/26 Richard Gaskin :
FWIW, here's a a function I pulled out of my archives which is a  
sort of
variant of Cal in native RevTalk, making a single month from a date  
passed
to it.  I'll leave it as an exercise to the user to make a year out  
of it if

needed.

One of the nice things about RevTalk is that the weekDayNames and  
monthNames
functions return values in the current system's local language, so  
this is

localized without having to do anything.


I confess that I have missed these two valuables functions.

Interestingly, without the overhead involved in going to shell it's  
about 20

times faster on my machine than calling shell("cal").


It's instant on my machine. So with your script I could back in  
time? 8-)



However as far I have understood it seems that the property
useSystemDate set to true is necessary to obtain values according with
the local language.
Plus, a second difficulty exists: the week don't starts necessary a
Sunday but a Monday.

So I try to improve the Richard's solution like this:

function Cal pDate, pFirstDayWeek
  set useSystemDate to true
   -- Returns a plain-text calendar representation of
   -- the month the date specified in pDate is in.
   -- If no month is provided it uses the current
   -- month. Month and day names use the user's current
   -- system settings.
   --
   -- Use current date as default:
  if pDate is empty then put the date into pDate
  if pFirstDayWeek is empty then put "Sunday" into pFirstDayWeek
   -- Verify date is valid:
   convert pDate to dateitems
   if the result is not empty then return "Error: "& the result
   --
   put empty into tCal
   --
   -- Make month/year header:
  put item 1 of pDate into tYear
  put item 2 of pDate into tMonthNumber
  put line (tMonthNumber) of the monthNames into tMonth
  put tMonth && tYear into tHeader
   -- Center it:
   repeat for ( (20 - len(tHeader)) div 2)
put " " after tCal
   end repeat
   put tHeader &cr after tCal
   --
   -- Make day names header:
   put weekdayNamesList(pFirstDayWeek) into tWeekdayNames
   repeat for each line tDay in tWeekdayNames
put char 1 to 2 of tDay &" " after tCal
   end repeat
   put cr after tCal
   --
   -- Pad beginning with empty days:
  put createDate(tYear,tMonthNumber,1) into tStartDay -- create a
date in the system's local language
  convert tStartDay to dateitems
  if (pFirstDayWeek is "Monday") then
 repeat for (last item of tStartDay - 2)
   put "   " after tCal
  end repeat
  else
  repeat for (last item of tStartDay - 1)
   put "   " after tCal
  end repeat
  end if

  put createDate(tYear,tMonthNumber,1) into tStartDay -- create a
date in the system's local language

   -- Walk through 31 days, stopping when we reach a
   -- number not valid for the month we're doing:

   repeat with i = 1 to dayOf(addToDate(tStartDay,0,1,-1))
-- the end value is the number of days in the month. To
obtain the last date of a month, add 1 month and subtract one
-- day to the first day of a month
-- Get day number:
 put createDate(tYear,tMonthNumber,i) into tDate
 convert tDate to dateitems
 if the result is not empty then exit repeat
 put item 3 of tDate into tDayNum
--
-- Pad it and add it:
 if len(i) = 1 then put " " before i
 put i &" " after tCal
--
-- Go to next line if we're at the end of the week:
 if last item of tDate = lastDayOfWeek(pFirstDayWeek) then put cr
after tCal
   end repeat
   --
   -- Pad empty lines at end for uniform appearance
   -- when using multiple 

Re: an annual calendar somewhere?

2010-02-27 Thread Andre.Bisseret

Bonjour,

2010/2/26 Richard Gaskin :
FWIW, here's a a function I pulled out of my archives which is a  
sort of
variant of Cal in native RevTalk, making a single month from a date  
passed
to it.  I'll leave it as an exercise to the user to make a year out  
of it if

needed.

One of the nice things about RevTalk is that the weekDayNames and  
monthNames
functions return values in the current system's local language, so  
this is

localized without having to do anything.
Interestingly, without the overhead involved in going to shell it's  
about 20

times faster on my machine than calling shell("cal").


Le 27 févr. 10 à 01:12, zryip theSlug a écrit :


It's instant on my machine. So with your script I could back in  
time? 8-)


Very fast indeed on my machine too. Thank you much Richard




However as far I have understood it seems that the property
useSystemDate set to true is necessary to obtain values according with
the local language.
Plus, a second difficulty exists: the week don't starts necessary a
Sunday but a Monday.

So I try to improve the Richard's solution like this:


...
...


If some members of the list could validate this script in their own
language? 8-)


-> If your weeks starts a Monday call the function like this:

set useSystemDate to true
put cal(the date,"Monday") into fld "myField"


Works perfectly here ; very fast too




And thanks a lot Zryip for your other recent posts : links to the work  
of David Beck and to your experiment 009.

Sure will give me usefull hints

Best regards from Grenoble

André

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-26 Thread zryip theSlug
2010/2/26 Andre.Bisseret :
> Thank you much Bob for this nice calendar.
> Also, thanks to the others who added comments, results of trials and
> elaborated.
> I was not waiting for such a "rush" on this topic ;-))
>
> However, my problem is not solved with this kind of layout. Mostly I need
> that the user be able to highlight periods of the year.
> For example periods when a holidays' house has been rented (or is plan to be
> rented).
>
> With the present layout that can't be done. One can't drag (in order to
> highlight)  from jan. 2 to jan 9 for example, or from jan. 30 to feb 6 etc
>
> That why I am looking for an annual calendar with 12 rows/lines, one for
> each month ( or might be 12 columns).
>

André, if you need some examples have a look to the lab experiment 009

http://www.aslugontheroad.co.cc/index.php?option=com_content&view=article&id=68:experiment-009-playing-with-the-david-becks-calendar-lib&catid=35:lab&Itemid=53



HTH,

-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-26 Thread zryip theSlug
2010/2/26 Richard Gaskin :
> FWIW, here's a a function I pulled out of my archives which is a sort of
> variant of Cal in native RevTalk, making a single month from a date passed
> to it.  I'll leave it as an exercise to the user to make a year out of it if
> needed.
>
> One of the nice things about RevTalk is that the weekDayNames and monthNames
> functions return values in the current system's local language, so this is
> localized without having to do anything.

I confess that I have missed these two valuables functions.

> Interestingly, without the overhead involved in going to shell it's about 20
> times faster on my machine than calling shell("cal").

It's instant on my machine. So with your script I could back in time? 8-)


However as far I have understood it seems that the property
useSystemDate set to true is necessary to obtain values according with
the local language.
Plus, a second difficulty exists: the week don't starts necessary a
Sunday but a Monday.

So I try to improve the Richard's solution like this:

function Cal pDate, pFirstDayWeek
   set useSystemDate to true
    -- Returns a plain-text calendar representation of
    -- the month the date specified in pDate is in.
    -- If no month is provided it uses the current
    -- month. Month and day names use the user's current
    -- system settings.
    --
    -- Use current date as default:
   if pDate is empty then put the date into pDate
   if pFirstDayWeek is empty then put "Sunday" into pFirstDayWeek
    -- Verify date is valid:
    convert pDate to dateitems
    if the result is not empty then return "Error: "& the result
    --
    put empty into tCal
    --
    -- Make month/year header:
   put item 1 of pDate into tYear
   put item 2 of pDate into tMonthNumber
   put line (tMonthNumber) of the monthNames into tMonth
   put tMonth && tYear into tHeader
    -- Center it:
    repeat for ( (20 - len(tHeader)) div 2)
     put " " after tCal
    end repeat
    put tHeader &cr after tCal
    --
    -- Make day names header:
    put weekdayNamesList(pFirstDayWeek) into tWeekdayNames
    repeat for each line tDay in tWeekdayNames
     put char 1 to 2 of tDay &" " after tCal
    end repeat
    put cr after tCal
    --
    -- Pad beginning with empty days:
   put createDate(tYear,tMonthNumber,1) into tStartDay -- create a
date in the system's local language
   convert tStartDay to dateitems
   if (pFirstDayWeek is "Monday") then
  repeat for (last item of tStartDay - 2)
    put "   " after tCal
   end repeat
   else
   repeat for (last item of tStartDay - 1)
    put "   " after tCal
   end repeat
   end if

   put createDate(tYear,tMonthNumber,1) into tStartDay -- create a
date in the system's local language

    -- Walk through 31 days, stopping when we reach a
    -- number not valid for the month we're doing:

    repeat with i = 1 to dayOf(addToDate(tStartDay,0,1,-1))
 -- the end value is the number of days in the month. To
obtain the last date of a month, add 1 month and subtract one
 -- day to the first day of a month
     -- Get day number:
  put createDate(tYear,tMonthNumber,i) into tDate
  convert tDate to dateitems
  if the result is not empty then exit repeat
  put item 3 of tDate into tDayNum
     --
     -- Pad it and add it:
  if len(i) = 1 then put " " before i
  put i &" " after tCal
     --
     -- Go to next line if we're at the end of the week:
  if last item of tDate = lastDayOfWeek(pFirstDayWeek) then put cr
after tCal
    end repeat
    --
    -- Pad empty lines at end for uniform appearance
    -- when using multiple calendars in a field:
    repeat for (8-the number of lines of tCal)
     put cr after tCal
    end repeat
    --
    -- Send it to the caller:
    return tCal
end Cal

function weekdayNamesList pFirstDay
   set useSystemDate to true
   put the abbr weekdayNames into tWeekdayNames
   if pFirstDay is "Monday" then
  put cr&first line of tWeekdayNames after tWeekdayNames
  delete first line of tWeekdayNames
   end if
   return tWeekdayNames
end weekdayNamesList

function lastDayOfWeek pFirstDay
   if pFirstDay is "Monday" then
  return 1
   else
  return 7
   end if
end lastDayOfWeek

function firstDayInMonth pStartDate
   -- Return the first day in a month
   set useSystemDate to true
   convert pStartDate to dateitems
   put 1 into item 3 of pStartDate
   convert pStartDate to short date
   return pStartDate
end firstDayInMonth

function createDate pTheYear,pTheMonth,pTheDay
   local tDateItems

   set useSystemDate to true
   put pTheYear,pTheMonth,pTheDay,0,0,0,0 into tDateItems
   convert tDateItems from dateItems to short date
   return tDateItems
end createDate

function addToDate pStartDate,pAddToYear,pAddToMonth,pAddToDay
   -- Allows you to manipulate a date in a single pass
   set useSystemDate to true
   convert pStartDate to dateitems
   add pAddToYear to item 1 of pStar

Re: an annual calendar somewhere?

2010-02-26 Thread zryip theSlug
2010/2/26 Brian Yennie :
> According to the ncal docs, the country code has nothing to do with language, 
> just Gregorian dates:
>
>    -s country_code
>            Assume the switch from Julian to Gregorian Calendar at the date
>            associated with the country_code.  If not specified, ncal tries to
>            guess the switch date from the local environment or falls back to
>            September 2, 1752.  This was when Great Britain and her colonies
>            switched to the Gregorian Calendar.

You're right Brian. I confess that I've only read "country_code" and
thought it was a solution. Then I searched on forums the list of
available country code. I have seen an example in a forum and
concluded that I was in the good way...


2010/2/26 Yves COPPE :
> no, 10.5.7

Odds. In theory I'm not in a custom system. The ncal was definitively
not the solution ;)


2010/2/26 Andre.Bisseret :
> Thank you much Bob for this nice calendar.
> Also, thanks to the others who added comments, results of trials and
> elaborated.
> I was not waiting for such a "rush" on this topic ;-))
>
> However, my problem is not solved with this kind of layout. Mostly I need
> that the user be able to highlight periods of the year.
> For example periods when a holidays' house has been rented (or is plan to be
> rented).
>
> With the present layout that can't be done. One can't drag (in order to
> highlight)  from jan. 2 to jan 9 for example, or from jan. 30 to feb 6 etc
>
> That why I am looking for an annual calendar with 12 rows/lines, one for
> each month ( or might be 12 columns).

André,

Have a look to the work of David Beck:

http://www.rotundasoftware.com/rev/

He sent an announce on the list:

http://www.mail-archive.com/use-revolution@lists.runrev.com/msg129010.html


-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-26 Thread Richard Gaskin
FWIW, here's a a function I pulled out of my archives which is a sort of 
variant of Cal in native RevTalk, making a single month from a date 
passed to it.  I'll leave it as an exercise to the user to make a year 
out of it if needed.


One of the nice things about RevTalk is that the weekDayNames and 
monthNames functions return values in the current system's local 
language, so this is localized without having to do anything.


Interestingly, without the overhead involved in going to shell it's 
about 20 times faster on my machine than calling shell("cal").



function Cal pDate
  -- Returns a plain-text calendar representation of
  -- the month the date specified in pDate is in.
  -- If no month is provided it uses the current
  -- month. Month and day names use the user's current
  -- system settings.
  --
  -- Use current date as default:
  if pDate is empty then put the date into pDate
  -- Verify date is valid:
  convert pDate to dateitems
  if the result is not empty then return "Error: "& the result
  --
  put empty into tCal
  --
  -- Make month/year header:
  put item 1 of pDate into tYear
  put line (item 2 of pDate) of the monthNames into tMonth
  put tMonth && tYear into tHeader
  -- Center it:
  repeat for ( (20 - len(tHeader)) div 2)
put " " after tCal
  end repeat
  put tHeader &cr after tCal
  --
  -- Make day names header:
  put the abbr weekdayNames into tWeekdayNames
  repeat for each line tDay in tWeekdayNames
put char 1 to 2 of tDay &" " after tCal
  end repeat
  put cr after tCal
  --
  -- Pad beginning with empty days:
  put tMonth && "1"&& tYear into tStartDay
  convert tStartDay to dateitems
  repeat for (last item of tStartDay - 1)
put "   " after tCal
  end repeat
  --
  -- Walk through 31 days, stopping when we reach a
  -- number not valid for the month we're doing:
  repeat with i = 1 to 31
-- Get day number:
put tMonth &&i&& tYear into tDate
convert tDate to dateitems
if the result is not empty then exit repeat
put item 3 of tDate into tDayNum
--
-- Pad it and add it:
if len(i) = 1 then put " " before i
put i &" " after tCal
--
-- Go to next line if we're at the end of the week:
if last item of tDate = 7 then put cr after tCal
  end repeat
  --
  -- Pad empty lines at end for uniform appearance
  -- when using multiple calendars in a field:
  repeat for (8-the number of lines of tCal)
put cr after tCal
  end repeat
  --
  -- Send it to the caller:
  return tCal
end Cal



--
 Richard Gaskin
 Fourth World
 Rev training and consulting: http://www.fourthworld.com
 Webzine for Rev developers: http://www.revjournal.com
 revJournal blog: http://revjournal.com/blog.irv
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-26 Thread Andre.Bisseret

Thank you much Bob for this nice calendar.
Also, thanks to the others who added comments, results of trials and  
elaborated.

I was not waiting for such a "rush" on this topic ;-))

However, my problem is not solved with this kind of layout. Mostly I  
need that the user be able to highlight periods of the year.
For example periods when a holidays' house has been rented (or is plan  
to be rented).


With the present layout that can't be done. One can't drag (in order  
to highlight)  from jan. 2 to jan 9 for example, or from jan. 30 to  
feb 6 etc


That why I am looking for an annual calendar with 12 rows/lines, one  
for each month ( or might be 12 columns).



Best regards from Grenoble (by the way, I joined the runrev folks  
google map ;-)


André







Le 25 févr. 10 à 20:45, Robert Cole a écrit :


André:
On Mac OS X, I use a simple shell command to put the calendar into a  
field .

put shell("cal 2010") into field "Calendar Field"
Be sure to use a monospace font like Courier in the field
Bob
- - - - - - -
Bonjour,
I need an annual calendar, one which could be display entirely on one
card of a stack.
Something like 12 rows, one for each months.

Does someone know if that has already been done with runrev and if it
is possible to get it somewhere?

Thanks a lot in advance for any clue

Best regards from Grenoble

André
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution




___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere? - French Version

2010-02-26 Thread Francis Nugent Dixon

Hi from Beautiful Brittany,

I played with "zryip theSlug's" code for all of
30 seconds, replace ncal command by "cal 2010",
corrected the line ending errors, corrected the
month of August, and it all works fine for me.
I'm on 10.5.8.

Merci Monsieur "zryip theSlug"

Francis


on mouseUp
  local tTheCal, tTheMonth, tTheFrenchMonth, tTheDay, tTheFrenchDay

  put  
"January 
,February 
,March 
,April,May,June,July,August,September,October,November,December"  
into tTheMonth
  put  
"Janvier 
,Février 
,Mars 
,Avril,Mai,Juin,Juillet,Août,Septembre,Octobre,Novembre,Décembre"  
into tTheFrenchMonth

  put "Mo,Tu,We,Th,Fr,Sa,Su" into tTheDay
  put "Lu,Ma,Me,Je,Ve,Sa,Di" into tTheFrenchDay

  put shell("cal 2010") into tTheCal

  -- Translate month
  repeat with x = 1 to number of items in tTheMonth
 replace (item x of tTheMonth) with (item x of tTheFrenchMonth)  
in tTheCal

  end repeat

  -- Translate day
  repeat with x = 1 to number of items in tTheDay
 replace (item x of tTheDay) with (item x of tTheFrenchDay) in  
tTheCal

  end repeat

  put tTheCal into fld "MyCal"

end mouseUp








___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread Yves COPPE


Le 25-févr.-10 à 23:05, zryip theSlug a écrit :




 put shell("ncal -s FR 2010") into tTheCal


error  : /bin/sh: line 1: ncal: command not found

Greetings.

Yves COPPE
yvesco...@skynet.be



Maybe you are in 10.4?






Re,

no, 10.5.7



Greetings.

Yves COPPE
yvesco...@skynet.be

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread Robert Cole
I created a small stack to show how I use a monthly calendar (using  
the shell command) and the mouseText function to pick a date.
I just uploaded "Calendar Picker" to RevOnLine where it is now  
available for download.

Please feel free to use this stack and refine the visual appearance.
It can be used as a popup stack but I don't know how to return a date  
to the calling stack.

Enjoy the Calendar Picker stack,
Bob

Robert Cole wrote:

André:
On Mac OS X, I use a simple shell command to put the calendar into a
field .
put shell("cal 2010") into field "Calendar Field"
Be sure to use a monospace font like Courier in the field


!!! Had no idea. That is too cool.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread Brian Yennie
According to the ncal docs, the country code has nothing to do with language, 
just Gregorian dates:

-s country_code
Assume the switch from Julian to Gregorian Calendar at the date
associated with the country_code.  If not specified, ncal tries to
guess the switch date from the local environment or falls back to
September 2, 1752.  This was when Great Britain and her colonies
switched to the Gregorian Calendar.


> 2010/2/25 J. Landman Gay :
>> zryip theSlug wrote:
>>> 
>>> Maybe you are in 10.4?
>>> 
>>> 
>> 
>> It does seem to be OS-related. On my Snow Leopard machine, ncal is
>> supported. On my plain Leopard Mac, it is not. But even on Snow Leopard I
>> don't see French, the calendar is returned in English.
> 
> Thanks, interesting to know.
> 
> If I consider my test, changing the country has no effect. First I
> believe that the command will be return the calendar with a difference
> with the first day of the week (as you know, it's not sunday in
> french, but monday) but I obtain all the time monday as first day of
> the week...
> 
> For the translation, a quick replace as I propose previously, could do
> the job. The difficulty here, is have the right system version...
> 
> 
> -- 
> -Zryip TheSlug- wish you the best! 8)
> http://www.aslugontheroad.co.cc
> __
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread zryip theSlug
2010/2/25 J. Landman Gay :
> zryip theSlug wrote:
>>
>> Maybe you are in 10.4?
>>
>>
>
> It does seem to be OS-related. On my Snow Leopard machine, ncal is
> supported. On my plain Leopard Mac, it is not. But even on Snow Leopard I
> don't see French, the calendar is returned in English.

Thanks, interesting to know.

If I consider my test, changing the country has no effect. First I
believe that the command will be return the calendar with a difference
with the first day of the week (as you know, it's not sunday in
french, but monday) but I obtain all the time monday as first day of
the week...

For the translation, a quick replace as I propose previously, could do
the job. The difficulty here, is have the right system version...


-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread J. Landman Gay

zryip theSlug wrote:


Maybe you are in 10.4?




It does seem to be OS-related. On my Snow Leopard machine, ncal is 
supported. On my plain Leopard Mac, it is not. But even on Snow Leopard 
I don't see French, the calendar is returned in English.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread zryip theSlug
2010/2/25 zryip theSlug :
> 2010/2/25 Yves COPPE :
>>
>> Le 25-févr.-10 à 22:37, zryip theSlug a écrit :

>>>
>>> Okay, okay.
>>>
>>> on mouseUp
>>>  local tTheCal, tTheMonth, tTheFrenchMonth, tTheDay, tTheFrenchDay
>>>
>>>  put
>>> "January,February,March,April,May,June,July,August,September,October,November,December"
>>> into tTheMonth
>>>  put
>>> "Janvier,Février,Mars,Avril,Mai,Juin,Juillet,Aiut,Septembre,Octobre,Novembre,Décembre"
>>> into tTheFrenchMonth
>>>  put "Mo,Tu,We,Th,Fr,Sa,Su" into tTheDay
>>>  put "Lu,Ma,Me,Je,Ve,Sa,Di" into tTheFrenchDay
>>>
>>>  put shell("ncal -s FR 2010") into tTheCal
>>>
>>>  -- Translate month
>>>  repeat with x = 1 to number of items in tTheMonth
>>>     replace (item x of tTheMonth) with (item x of tTheFrenchMonth) in
>>> tTheCal
>>>  end repeat
>>>
>>>  -- Translate day
>>>  repeat with x = 1 to number of items in tTheDay
>>>     replace (item x of tTheDay) with (item x of tTheFrenchDay) in tTheCal
>>>  end repeat
>>>
>>>  put tTheCal into fld "Calendar Field"
>>>
>>> end mouseUp
>>>
>>> And now?
>>>
>>>
>>
>> Re
>>
>>
>>>  put shell("ncal -s FR 2010") into tTheCal
>>
>> error  : /bin/sh: line 1: ncal: command not found
>>

In the manual for the cal command, I found this:

HISTORY
 A cal command appeared in Version 5 AT&T UNIX.  The ncal command
appeared in FreeBSD 2.2.6.

AUTHORS
 The ncal command and manual were written by Wolfgang Helbig
.

It seems that the ncal command is only available since OS X 10.5.


-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread zryip theSlug
2010/2/25 Yves COPPE :
>
> Le 25-févr.-10 à 22:37, zryip theSlug a écrit :
>>>
>>
>> Okay, okay.
>>
>> on mouseUp
>>  local tTheCal, tTheMonth, tTheFrenchMonth, tTheDay, tTheFrenchDay
>>
>>  put
>> "January,February,March,April,May,June,July,August,September,October,November,December"
>> into tTheMonth
>>  put
>> "Janvier,Février,Mars,Avril,Mai,Juin,Juillet,Aiut,Septembre,Octobre,Novembre,Décembre"
>> into tTheFrenchMonth
>>  put "Mo,Tu,We,Th,Fr,Sa,Su" into tTheDay
>>  put "Lu,Ma,Me,Je,Ve,Sa,Di" into tTheFrenchDay
>>
>>  put shell("ncal -s FR 2010") into tTheCal
>>
>>  -- Translate month
>>  repeat with x = 1 to number of items in tTheMonth
>>     replace (item x of tTheMonth) with (item x of tTheFrenchMonth) in
>> tTheCal
>>  end repeat
>>
>>  -- Translate day
>>  repeat with x = 1 to number of items in tTheDay
>>     replace (item x of tTheDay) with (item x of tTheFrenchDay) in tTheCal
>>  end repeat
>>
>>  put tTheCal into fld "Calendar Field"
>>
>> end mouseUp
>>
>> And now?
>>
>>
>
> Re
>
>
>>  put shell("ncal -s FR 2010") into tTheCal
>
> error  : /bin/sh: line 1: ncal: command not found
>
> Greetings.
>
> Yves COPPE
> yvesco...@skynet.be
>

Maybe you are in 10.4?


-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread Yves COPPE


Le 25-févr.-10 à 22:51, zryip theSlug a écrit :

I'm on OS X too, and it seems that the ncal and cal commands are  
linked.


When you type:
put shell("man ncal") into fld "Calendar Field"
What do you get?




re,
I get this :
No manual entry for ncal


Greetings.

Yves COPPE
yvesco...@skynet.be

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread Yves COPPE


Le 25-févr.-10 à 22:37, zryip theSlug a écrit :




Okay, okay.

on mouseUp
  local tTheCal, tTheMonth, tTheFrenchMonth, tTheDay, tTheFrenchDay

  put  
"January 
,February 
,March,April,May,June,July,August,September,October,November,December"

into tTheMonth
  put  
"Janvier 
,Février 
,Mars,Avril,Mai,Juin,Juillet,Aiut,Septembre,Octobre,Novembre,Décembre"

into tTheFrenchMonth
  put "Mo,Tu,We,Th,Fr,Sa,Su" into tTheDay
  put "Lu,Ma,Me,Je,Ve,Sa,Di" into tTheFrenchDay

  put shell("ncal -s FR 2010") into tTheCal

  -- Translate month
  repeat with x = 1 to number of items in tTheMonth
 replace (item x of tTheMonth) with (item x of tTheFrenchMonth)  
in tTheCal

  end repeat

  -- Translate day
  repeat with x = 1 to number of items in tTheDay
 replace (item x of tTheDay) with (item x of tTheFrenchDay) in  
tTheCal

  end repeat

  put tTheCal into fld "Calendar Field"

end mouseUp

And now?




Re



 put shell("ncal -s FR 2010") into tTheCal


error  : /bin/sh: line 1: ncal: command not found

Greetings.

Yves COPPE
yvesco...@skynet.be

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread zryip theSlug
2010/2/25 J. Landman Gay :
> zryip theSlug wrote:
>
>>
>>   put tTheCal into fld "Calendar Field"
>>
>> end mouseUp
>>
>> And now?
>>
>>
>
> When I tried to use "ncal" on OS X, the command wasn't found. It seems it is
> unsupported there.
>
> --
> Jacqueline Landman Gay         |     jac...@hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

I'm on OS X too, and it seems that the ncal and cal commands are linked.

When you type:
put shell("man ncal") into fld "Calendar Field"
What do you get?

-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread J. Landman Gay

zryip theSlug wrote:



   put tTheCal into fld "Calendar Field"

end mouseUp

And now?




When I tried to use "ncal" on OS X, the command wasn't found. It seems 
it is unsupported there.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread zryip theSlug
2010/2/25 Yves COPPE :
>
> Le 25-févr.-10 à 21:56, zryip theSlug a écrit :
>
>> 2010/2/25 Yves COPPE :
>>
>>> one question : is it possible to get the calendar in the chosen language
>>> in
>>> the preferences system (in my case : french) ?
>>>
>>
>> Not sure that the calendar is stored in different languages.
>>
>> For french, try this:
>>
>> put shell("ncal -s FR 2010") into field "Calendar Field"
>>
>
>
> re
>
> no, it doesn't work ...
> it's a pity
>
> Thanks for trying to help me !
>

Okay, okay.

on mouseUp
   local tTheCal, tTheMonth, tTheFrenchMonth, tTheDay, tTheFrenchDay

   put 
"January,February,March,April,May,June,July,August,September,October,November,December"
into tTheMonth
   put 
"Janvier,Février,Mars,Avril,Mai,Juin,Juillet,Aiut,Septembre,Octobre,Novembre,Décembre"
into tTheFrenchMonth
   put "Mo,Tu,We,Th,Fr,Sa,Su" into tTheDay
   put "Lu,Ma,Me,Je,Ve,Sa,Di" into tTheFrenchDay

   put shell("ncal -s FR 2010") into tTheCal

   -- Translate month
   repeat with x = 1 to number of items in tTheMonth
  replace (item x of tTheMonth) with (item x of tTheFrenchMonth) in tTheCal
   end repeat

   -- Translate day
   repeat with x = 1 to number of items in tTheDay
  replace (item x of tTheDay) with (item x of tTheFrenchDay) in tTheCal
   end repeat

   put tTheCal into fld "Calendar Field"

end mouseUp

And now?


-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread Richmond Mathewson

For an understanding of the parameters of the calendar
do this:

put shell ("call -500") into fld "Calendar Field"

that will generate an error (hard luck Herodotus!) and details
of all the parameters . . .
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread Yves COPPE


Le 25-févr.-10 à 21:56, zryip theSlug a écrit :


2010/2/25 Yves COPPE :

one question : is it possible to get the calendar in the chosen  
language in

the preferences system (in my case : french) ?



Not sure that the calendar is stored in different languages.

For french, try this:

put shell("ncal -s FR 2010") into field "Calendar Field"




re

no, it doesn't work ...
it's a pity

Thanks for trying to help me !


Greetings.

Yves COPPE
yvesco...@skynet.be

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread Richmond Mathewson

AND . . . it works on Linux as well . . .  :)

Presumably this is because of the common UNIXy base of both Mac OS X
and Linux.

So, to get hold of a Julian calendar would involve mucking around with the
data that arrived in the display field.

And an Islamic, Jewish, Buddhist or Hindu (there are lots of those) calendar
would probably have to be 'pulled' from the internet ?
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread zryip theSlug
2010/2/25 Yves COPPE :

> Re,
>
> ye !
>
> one question : is it possible to get the calendar in the chosen language in
> the preferences system (in my case : french) ?
>
>
> Greetings.
>
> Yves COPPE
> yvesco...@skynet.be
>

Yves,

Not sure that the calendar is stored in different languages.

For french, try this:

put shell("ncal -s FR 2010") into field "Calendar Field"

-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread Yves COPPE


Le 25-févr.-10 à 20:45, Robert Cole a écrit :


André:
On Mac OS X, I use a simple shell command to put the calendar into a  
field .

put shell("cal 2010") into field "Calendar Field"
Be sure to use a monospace font like Courier in the field
Bob
- - - - - - -




Re,

ye !

one question : is it possible to get the calendar in the chosen  
language in the preferences system (in my case : french) ?



Greetings.

Yves COPPE
yvesco...@skynet.be

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread zryip theSlug
2010/2/25 Robert Cole :
> André:
> On Mac OS X, I use a simple shell command to put the calendar into a field .
>     put shell("cal 2010") into field "Calendar Field"
> Be sure to use a monospace font like Courier in the field
> Bob

Thanks for the tip, Bob ;)


More infos for using the cal shell command:

NAME
 cal, ncal -- displays a calendar and the date of easter

SYNOPSIS
 cal [-jy] [[month] year]
 cal [-j] -m month [year]
 ncal [-jJpwy] [-s country_code] [[month] year]
 ncal [-Jeo] [year]

DESCRIPTION
 The cal utility displays a simple calendar in traditional format
and ncal offers an alternative layout,
 more options and the date of easter.  The new format is a little
cramped but it makes a year fit on a
 25x80 terminal.  If arguments are not specified, the current
month is displayed.

 The options are as follows:

 -J  Display Julian Calendar, if combined with the -e option,
display date of easter according to
 the Julian Calendar.

 -e  Display date of easter (for western churches).

 -j  Display Julian days (days one-based, numbered from January 1).

 -m month
 Display the specified month.

 -o  Display date of orthodox easter (Greek and Russian
Orthodox Churches).

 -p  Print the country codes and switching days from Julian to
Gregorian Calendar as they are
 assumed by ncal.  The country code as determined from the
local environment is marked with an
 asterisk.

 -s country_code
 Assume the switch from Julian to Gregorian Calendar at
the date associated with the
 country_code.  If not specified, ncal tries to guess the
switch date from the local environment
 or falls back to September 2, 1752.  This was when Great
Britain and her colonies switched to
 the Gregorian Calendar.

 -w  Print the number of the week below each week column.

 -y  Display a calendar for the specified year.

 A single parameter specifies the year (1 - ) to be displayed;
note the year must be fully speci-fied: specified:
 fied: ``cal 89'' will not display a calendar for 1989.  Two
parameters denote the month and year; the
 month is either a number between 1 and 12, or a full or
abbreviated name as specified by the current
 locale.  Month and year default to those of the current system
clock and time zone (so ``cal -m 8''
 will display a calendar for the month of August in the current year).

 A year starts on Jan 1.


And an useful link to explore:
http://developer.apple.com/Mac/library/documentation/Darwin/Reference/ManPages/index.html

-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread J. Landman Gay

Robert Cole wrote:

André:
On Mac OS X, I use a simple shell command to put the calendar into a 
field .

 put shell("cal 2010") into field "Calendar Field"
Be sure to use a monospace font like Courier in the field


!!! Had no idea. That is too cool.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: an annual calendar somewhere?

2010-02-25 Thread Robert Cole

André:
On Mac OS X, I use a simple shell command to put the calendar into a  
field .

 put shell("cal 2010") into field "Calendar Field"
Be sure to use a monospace font like Courier in the field
Bob
- - - - - - -
Bonjour,
I need an annual calendar, one which could be display entirely on one
card of a stack.
Something like 12 rows, one for each months.

Does someone know if that has already been done with runrev and if it
is possible to get it somewhere?

Thanks a lot in advance for any clue

Best regards from Grenoble

André
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution