OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

xacml message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [xacml] Question on Time Extensions

Hi David,

On 4/10/2019 5:53 am, David Brossard wrote:
Hi Hal,

I think there is a need for a function that can take a range of weekdays (Monday, Friday) and compare that to the current date's (or any date) day of the week. Do we have that today? For instance, what if you wanted to write a policy that states:

  * Permit on Mondays and Fridays

The only way to do so today would be to write a custom function that would extract the day of the week the date is on and then compare to these two.

Steven, is that what you're trying to do?

That sort of thing is the main use case for the dayOfWeek data-type and can be
achieved with the dateTime-in-dayOfWeek-range function. We can test if a dateTime
falls on a particular day of the week by setting the second and third arguments
to the same value. The second argument is converted to the dateTime of the first
instant on the day and the third argument is converted to the dateTime of the last
instant on the day. So Mondays and Fridays (for me) would be:

	dateTime-in-dayOfWeek-range(current-dateTime, "1+10:00", "1+10:00")
	dateTime-in-dayOfWeek-range(current-dateTime, "5+10:00", "5+10:00")

If I were interested in Mondays *to* Fridays I would use:

	dateTime-in-dayOfWeek-range(current-dateTime, "1+10:00", "5+10:00")

I don't have a current need for an equality function for dayOfWeek values, though
data-types conventionally have an equality function.



On Thu, Oct 3, 2019 at 2:42 PM Hal Lockhart <harold.w.lochhart@gmail.com <mailto:harold.w.lochhart@gmail.com>> wrote:


    I have finally taken a careful look at the profile. I understand the need for the timezone attribute to be in multiple categories.

    However, I am still stuck on the "equality rule for dayOfWeek" issue.

    I am not sure what functionality is desired here. Given two datetimes normalized to the same timezone, determining if they are both in the same day of week or not seems straight forward to me. What am I missing?

    It also seems like the same procedure would let you compare a normalized datetime to a dayOfWeek and determine if the former falls in the latter.

    Help me out here.


    <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> 	Virus-free. www.avg.com <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>


David Brossard
VP of Customer Relations
+1 312 774-9163
+1 502 922 6538
+46(0)760 25 85 75

Axiomatics | 525 W. Monroe Suite 2310 | Chicago 60661 <https://maps.google.com/?q=525+W.+Monroe+Suite+2310+%7C+Chicago+60661&entry=gmail&source=g>
Support: https://support.axiomatics.com <https://support.axiomatics.com/>
Web: http://www.axiomatics.com <http://www.axiomatics.com/>

We've recently updated our privacy policy. You can view it here <http://www.axiomatics.com/wp-content/uploads/2018/05/Axiomatics-Privacy-Policy-Updated-May-2018.pdf>.

Axiomatics Blog <http://www.axiomatics.com/blog/>Â| Events <http://www.axiomatics.com/events.html>Â| Resources, Webinars & Whitepapers <http://www.axiomatics.com/resources.html>
Connect with us on LinkedIn <http://www.linkedin.com/companies/536082>Â| Twitter <http://twitter.com/axiomatics>Â| Google + <https://plus.google.com/u/1/b/101496487994084529291/>Â| Facebook <https://www.facebook.com/axiomatics>Â| YouTube <http://www.youtube.com/user/axiomaticsab>Â| Stackoverflow <https://stackoverflow.com/users/1021725/david-brossard>

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]