English
Forum

DateEdit and Number of weeks

 

Sato
Pinto
Hello on all sides

knows someone whether the DateEdit control too whom Number of weeks outputs or remaining only The Possibility the To to charge?

greeting
Sato
 
Sato Pinto
WIN XP Home
XPROFAN 11
09/26/08  
 




Nico
Madysa
of my Wissens gives the Date-Edit only the from, what it too indicating. The number the chosen week müsstest You means self calculate.
 
Nico Madysa
09/26/08  
 




Jac
de
Lad
Yes, very. Lies still the date from and lass you with the mwdate.dll The week to charge.
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
09/26/08  
 




Sato
Pinto
Hello Jac

thanks for hint, but I faith The DLL has The weeks number function not, or I have it overlooking

greeting
Sato
 
Sato Pinto
WIN XP Home
XPROFAN 11
09/26/08  
 




Jörg
Sellmeyer
look time, whether you that here weiterhilft: [...] 
and the: [...] 
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
09/26/08  
 




Thomas
Freier
or the Calendar from the MMJ-Quellcodesammlung:  [...] 

8 kB
Hochgeladen:09/27/08
Downloadcounter94
Download
 
Gruß Thomas
Windows XP SP2, XProfan X2
09/27/08  
 




Sato
Pinto
Hello
from the named Solutions functions only the Calendar with the Wochennummern from the MMJ-Quellcodesammlung, still see I no Möglickeit only The Wochennummer from it To fish. knows someone whether the possibly is?

greeting
Sato
 
Sato Pinto
WIN XP Home
XPROFAN 11
09/27/08  
 




Sato
Pinto
Hello
apparently is the Wochennummer berechnung no so light thing. have a little bit gegoogelt and this code in PowerBasic found. is it possibly it to XProfan umzusetzen? Fals it klappen ought to becomes it certainly sometime too for others User usual his.

greeting
Sato
CompileMarkSeparation
*******************************************************
* Function Julian - returns Julian Day Number (JDN)   *
* Actually it counts days elapsed since "11/25/-4713" *
* (= Nov. 25, 4714 BCE)                               *
*******************************************************
FUNCTION Julian(BYVAL year AS LONG, _
BYVAL month AS LONG, _
BYVAL day AS LONG) AS LONG
LOCAL Days AS LONG, yearsBC AS LONG, yearsAD AS LONG

IF month < 3 THEN                                January or February?

    month = month + 12                             13th or 14th month ....
    DECR year                                      .... of prev. year
    END IF
    yearsBC = 4714 - 1                               4713 BC thru 1 BC
    yearsAD = year - 1                               1 AD thru (year of date minus 1)
    Days = INT((yearsBC + yearsAD) * 365.25)         calculate days in years
    Days = Days - (year  100)                       substract century leapdays
    Days = Days + (year  400)                       re-add valid ones
    Days = Days + INT(30.6 * (month - 1) + .2)       days in months elapsed (+ adjustment)
    FUNCTION = Days + day                            days in month of date
    END FUNCTION
    ***********************************************
    * Function DayOfWeek returns day of the week, *
    * where Monday = 1 .... Sunday = 7            *
    ***********************************************
    FUNCTION DayOfWeek(JDN AS LONG) AS BYTE
    FUNCTION = JDN MOD 7 + 1
    END FUNCTION
    ***********************************************************************
    * Function WeekOne returns first day of first week for the given year *
    * Note: This is only a helper function for WeekNumber                 *
    ***********************************************************************
    FUNCTION WeekOne(BYVAL year AS LONG) AS LONG
    LOCAL temp AS LONG, Thursday AS BYTE
    Thursday = 4
    temp = Julian(year, 1, 1) - 1                 Dec. 31 of prev. year
    DO
    INCR temp
    LOOP UNTIL DayOfWeek(temp) = Thursday         until first Thursday of year is found
    FUNCTION = temp - 3                           first day of first week is a Monday
    END FUNCTION
    *********************************************************************
    * Function WeekNumber returns ISO-proof weeknumber for a given date *
    *********************************************************************
    FUNCTION WeekNumber(BYVAL year AS LONG, _
    BYVAL month AS LONG, _
    BYVAL day AS LONG) AS BYTE
    LOCAL FirstDay AS LONG, FinalDay AS LONG, ToDay AS LONG
    LOCAL WkNumber AS BYTE
    FirstDay = WeekOne(year)
    FinalDay = WeekOne(year + 1) - 1
    ToDay    = Julian(year, month, day)

    SELECT CASE ToDay

        CASE < FirstDay       it is week 52 or 53, but which one?
        therefore we need week one of previous year as a starting point
        FirstDay = WeekOne(year - 1)
        CASE > FinalDay       there is only one possibility: week nbr 1
        FUNCTION = 1
        EXIT FUNCTION
        END SELECT
        FUNCTION = ((ToDay - FirstDay)  7) + 1
        END FUNCTION
        FUNCTION PBMain() AS LONG
        MSGBOX "Dec. 31, 1997 falls in week " & FORMAT$(WeekNumber(1997, 12, 31)) & $CRLF & _
        "Jan.  1, 1999 in week " & FORMAT$(WeekNumber(1999,  1,  1))
        END ef='./../../references-fonction/XProfan/function/'>FUNCTION
 
Sato Pinto
WIN XP Home
XPROFAN 11
09/27/08  
 




Thomas
Freier
is it the, what You need can: infdatum.zipper of  [...]  ?
 
Gruß Thomas
Windows XP SP2, XProfan X2
09/27/08  
 




Jörg
Sellmeyer
i see your trouble, sincere said, not. here's still a function/procedure "Week" drin, The very the power, what You seek:  [...] 
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
09/27/08  
 




Sato
Pinto
Hello Thomas

Vielen Thanks, this is very I need. having already whom Link visit, have it overlooking.
Gerhard Putschalka Page is a repository. too one best Thanks on it

greeting
Sato
 
Sato Pinto
WIN XP Home
XPROFAN 11
09/27/08  
 




Sato
Pinto
Hello Jörg

have it tested, but come lest clear
so as understood have must I to week a date prompt. z.b week 28092008
have different Formate attempts: week "28-09-2008" or week 20080928 but none supply
one richtiges Result. make I what wrong?

greeting
Sato
 
Sato Pinto
WIN XP Home
XPROFAN 11
09/27/08  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.534 Views

Untitledvor 0 min.
rquindt03/16/18
Rainer Hoefs06/14/16
Manfred Barei06/22/14
Pedro Miguel08/24/13
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie