Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6621807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:19:06+00:00 2026-05-25T21:19:06+00:00

After reading up on how to best handle users in multiple timezones properly, I’ve

  • 0

After reading up on how to best handle users in multiple timezones properly, I’ve learned that the way to go is to store all dates in an normalized, application-wide timezone – UTC and then apply the diff between the normalized timezone and the individual users timezone when outputting. Today I came to think if this would be appropriate to apply this approach to handling currency in software:

All stored currency are converted to a application-wide currency, lets say EUR (€), and when outputting, the currency is converted back into the users own currency, with an updated exchange rate of the day?

What’s common sense here? How is this generally solved and what should I be aware of before choosing a way to handle this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T21:19:07+00:00Added an answer on May 25, 2026 at 9:19 pm

    One standard approach is to store both an amount and a currency whenever monetary values are held and manipulated.

    See the Money Pattern in Martin Fowler’s Patterns of Enterprise Application Architecture.

    Fowler describes defining a simple datatype to hold the two primitive components, with overloaded arithmetical operators for performing monetary operations:

    “The basic idea is to have a Money class with fields for the numeric
    amount and the currency. You can store the amount as either an
    integral type or a fixed decimal type. The decimal type is easier for
    some manipulations, the integral for others. You should absolutely
    avoid any kind of floating point type, as that will introduce the kind
    of rounding problems that Money is intended to avoid. Most of the time
    people want monetary values rounded to the smallest complete unit,
    such as cents in the dollar. However, there are times when fractional
    units are needed. It’s important to make it clear what kind of money
    you’re working with, especially in an application that uses both
    kinds. It makes sense to have different types for the two cases as
    they behave quite differently under arithmetic.

    Money needs arithmetic operations so that you can use money objects as
    easily as you use numbers. But arithmetic operations for money have
    some important differences to money operations in numbers. Most
    obviously, any addition or subtraction needs to be currency aware so
    you can react if you try to add together monies of different
    currencies. The simplest, and most common, response is to treat the
    adding together of disparate currencies as an error. In some more
    sophisticated situations you can use Ward Cunningham’s idea of a money
    bag. This is an object that contains monies of multiple currencies
    together in one object. This object can then participate in
    calculations just like any money object. It can also be valued into a
    currency.”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After reading this answer: best way to pick a random subset from a collection?
After reading What is the best way to implement nested dictionaries? why is it
After reading this post I was wondering what would be the best way to
after reading 'What is the best way to create global variables in CakePHP?' in
after reading the SOAP 1.1 specs, it states that a SOAP Fault should return
(Title and contents updated after reading Alex's answer) In general I believe that it's
After reading this answer , it looks like it is a best practice to
After reading this forum I am not sure which method is best to extract
After reading this article net.tutsplus.com/tutorials/javascript-ajax/14-helpful-jquery-tricks-notes-and-best-practices/ I came to conclusion that using this.href is more
After reading: iphone: submit app with iOS 5 and XCode 4.2? I realize that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.